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 Amasiβ€’4w ago
Hey mark your ISR with IRAM_ATTR to place it in a faster and dedicated memory @UC GEE
UC GEE
UC GEEβ€’4w ago
Thanks @Marvee Amasi ..I will Carry out this your awesome suggestion
electro_coco
electro_cocoβ€’4w ago
are you using rtos api in interrupts?
UC GEE
UC GEEβ€’4w ago
Yes @electro_coco
electro_coco
electro_cocoβ€’4w 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 GEEβ€’4w ago
Ok @electro_coco .. Thanks for your vital information πŸ™..
Want results from more Discord servers?
Add your server
More Posts
collect temperature data from a sensor connected to my mcu and store it every minute on SD card@Middleware & OS Hello guys can i implement a simple sensor data collection and storage system usinHow can I modify the state machine logic?I'm working on this RTOS-based application for a vending machine controller with `C` and a *state maCan someone decode what data in hex is being sent in the following image?hello everyone can someone decode what data in hex is being sent in the following image?What is the role of a bootloader in embedded systems programming?A bootloader is a crucial piece of software in embedded systems, responsible for preparing the devictesting honeypot for Matter over Thread and WifiHello, For my masters thesis, We've made a honeypot with a Matter over Thread and WiFi network usingApple Intelligence: Apple’s New Generative AI UnveiledAt WWDC 2024, Apple introduced Apple Intelligence, a generative AI integrated across its ecosystem fHow can I set up a CoAP server using the libcoap library on a Raspberry Pi using c language?@Middleware & OS Hello guys how can I set up a CoAP server using the libcoap library on a RaspberryDebugging Variable Display Issues on ARM M7 with FreeRTOS using Lauterbach Trace32Hey guys @MCU, MPU & Firmware i am currently developing a test device using an ARM M7 (NXP S32KXXX)Real-Time Data Push to Web Browsers on Resource-Constrained Embedded ARM-Linux Devices@Middleware & OS I'm developing a real-time data monitoring application on a resource-constrained eEstablish a secure MQTT connection to a broker using TLS on an ESP32@Middleware & OS Hello everyone, I have a code that I'm trying to use to establish a secure MQTT co