How can I ensure my CAN ISR completes processing quickly enough to avoid the interrupt WDT panic?

@Middleware & OS I'm using an MCP25625 CAN controller with an ESP32-S3 and esp-idf with RTOS. I'm encountering an interrupt WDT panic within my CAN interrupt service routine (ISR). I know ISRs typically involve checking the interrupt cause, clearing the flag, and potentially deferring complex processing to a separate task using queues or semaphores. But in this case, I'm realizing that reading the MCP25625 registers within the ISR context might be causing the WDT panic. How can I ensure my CAN ISR completes processing quickly enough to avoid the interrupt WDT panic? Are there specific techniques for handling CAN interrupts efficiently within the ESP-IDF RTOS environment? Greetings Devs,l need your Kind Opinion(s) 🙏
6 Replies
Marvee Amasi
Marvee Amasi6mo ago
Hey mark your ISR with IRAM_ATTR to place it in a faster and dedicated memory @UC GEE
UC GEE
UC GEE6mo ago
Thanks @Marvee Amasi ..I will Carry out this your awesome suggestion
electro_coco
electro_coco6mo ago
are you using rtos api in interrupts?
UC GEE
UC GEE6mo ago
Yes @electro_coco
electro_coco
electro_coco6mo ago
then use interrupt safe api what is happening is that your interrupt is in hanging state and your high priority task takes the cpu time use the api which end with FromISR
UC GEE
UC GEE6mo ago
Ok @electro_coco .. Thanks for your vital information 🙏..
Want results from more Discord servers?
Add your server