Replies: 1 comment 2 replies
-
You should use FreeRTOS Queue, which you will fill with events from the interrupt and handle them in a task that is running with high priority. Chances are, you will be handling the interrupt in 2-3 microseconds. No dangerous code in ISR. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the SPIClass class to interface with a radio transceiver. Timing is critical and certain things must be handled in the interrupt context: for example, when the radio starts receiving, it generates an interrupt on a GPIO pin. I decorate all of my functions that run in the interrupt context with IRAM_ATTR and everything works great...until I enable light_sleep.
With light sleep enabled, I frequently get crashes like:
rst:0x8 (TG1WDT_SYS_RESET)
or
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
or
However, with light sleep disabled, the code runs without any problems and interrupt-driven SPI access works perfectly.
Any suggestions for how to get interrupt-driven access to the SPI bus working in conjunction with light sleep mode would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions