Interrupt causes panic on Core0
Posted: Thu Jul 12, 2018 4:01 pm
I have a timer interrupt that causes a "Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
"..... Core 0 was running in ISR context:
I am trying to port the Grbl CNC firmware to ESP32. The timer is used to handle step pulse timing. The steps can occur at more than 30kHz. I can get the firmware working using high priority tasks and semaphores , but that limits my speed to the RTOS frequency. Therefore, I believe I need to use interrupts. The code in the interrupt should take less than 10usec. It only takes about 30usec on and Arduino UNO. The code is too big to post here, but I could upload it to GitHub.
I have read dozens of topics related to this, but nothing seems to fix it. I want to use the Arduino IDE to make the code more accessible to average users. I have updated my esp32 files from github within the last week.
1. Does this mean the interrupt was running on Core0. Is that the case for Arduino IDE generated code? I thought it ran on Core1.
2. Can the ESP32 run fast and deterministic code like this
3. Can someone explain how interrupts interact with cores and freertos?
4. Are there any sdkconfig options that might help? What is the best way to manage those options in the Arduino IDE? Do I just edit sdkconfig or sdkconfig.h. Is there a way to manage that on a per project basis?
Thanks for any help you give.
Bart
"..... Core 0 was running in ISR context:
I am trying to port the Grbl CNC firmware to ESP32. The timer is used to handle step pulse timing. The steps can occur at more than 30kHz. I can get the firmware working using high priority tasks and semaphores , but that limits my speed to the RTOS frequency. Therefore, I believe I need to use interrupts. The code in the interrupt should take less than 10usec. It only takes about 30usec on and Arduino UNO. The code is too big to post here, but I could upload it to GitHub.
I have read dozens of topics related to this, but nothing seems to fix it. I want to use the Arduino IDE to make the code more accessible to average users. I have updated my esp32 files from github within the last week.
1. Does this mean the interrupt was running on Core0. Is that the case for Arduino IDE generated code? I thought it ran on Core1.
2. Can the ESP32 run fast and deterministic code like this
3. Can someone explain how interrupts interact with cores and freertos?
4. Are there any sdkconfig options that might help? What is the best way to manage those options in the Arduino IDE? Do I just edit sdkconfig or sdkconfig.h. Is there a way to manage that on a per project basis?
Thanks for any help you give.
Bart