Interrupt latency
Posted: Wed Apr 15, 2015 8:40 am
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
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