-->
Page 1 of 1

Interrupt latency

PostPosted: Wed Apr 15, 2015 8:40 am
by mculibrk
Hi there!
I'm working with the (H)SPI module and using the SPi generated interrupts to "recharge/restart" the SPI transfers.
The interrupt handler is attached using the API function ETS_SPI_INTR_ATTACH()

My interrupt handler takes around 200 cycles to complete (approx 2500 nS) and at the end it starts a new SPI transfer of ~480 bits.

Checking at the scope there is a gap of approx 8000 nS between successive SPI transmissions (see picture).

Is that 5uS latency "normal behavior"? What is the interrupt latency of the ESP/xtensa MCU?

If this latency is caused by the ESP library/API is there any option to use HW interrupts/vectors directly, bypassing any "slow library"?

Regards,
mculibrk

Re: Interrupt latency

PostPosted: Fri Jun 05, 2015 2:51 pm
by raz123
Hey mculibrk,

Were you ever able to get that IRQ firing lag under control?