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
Hey mark your ISR with
IRAM_ATTR
to place it in a faster and dedicated memory @UC GEEThanks @Marvee Amasi ..I will Carry out this your awesome suggestion
are you using rtos api in interrupts?
Yes @electro_coco
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
Ok @electro_coco .. Thanks for your vital information 🙏..