Functions called from ISRs

rith87

Functions called from ISRs

Postby rith87 » Thu Nov 17, 2016 5:16 pm

I'm hitting some crashes when I write to SPI, so I suspect that I'm calling some FLASH-based functions in an ISR. Is there some list of functions that are called by ISRs?

ISR functions:
- HW timer callbacks
- GPIO ISR callbacks (using ETS_GPIO_INTR_ATTACH())
- UART ISR callbacks (using ETS_UART_INTR_ATTACH())

Non-ISR functions
- SW timer callbacks
- espconn callbacks
- Posted tasks (using system_os_task and system_os_post)

Anyone else want to add to this list?

pratik

Re: Functions called from ISRs

Postby pratik » Sun Nov 27, 2016 1:28 pm

Timer ISRs are the ones where you have to be careful!
If you suspect that you're hitting something somewhere, use IRAM_ATTR marked functions in RTOS SDK. In nonOS SDK, just don't add ICACHE_FLASH_ATTR, which defaults it to iRAM.

Who is online

Users browsing this forum: No registered users and 302 guests