Something is causing a 1000+ clock delay

Derf Jagged
Posts: 8
Joined: Wed Jul 08, 2020 8:33 pm

Something is causing a 1000+ clock delay

Postby Derf Jagged » Tue Jul 21, 2020 4:45 am

Hello!

Here is my minimal code sample: https://pastebin.com/raw/rNx5Vgn2

I am getting a 1000+ clock delay every once in a while with this. If you run this program as is, it should output what looks to be a rather consistent amount of clock cycles each time (in my case, 54). However, if you uncomment the if statement, it shows that there are a ton of 1000+ clock cycles in there. This leads me to believe that my code is being interrupted by FreeRTOS. From what I gather, I can use portENTER_CRITICAL around the for loop to block any interruption, but this triggers this error which seems to point at any instruction within the for loop if I shuffle things around:

Code: Select all

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
PC: 0x400d0bc9: Select(void*) at C:\Users\Derf\Desktop\WDT_Test/WDT_Test.ino line 48
EXCVADDR: 0x00000000

Decoding stack results
0x400d0bc9: Select(void*) at C:\Users\Derf\Desktop\WDT_Test/WDT_Test.ino line 48
0x40088215: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
... but I have disabled the watchdogs in every way that I know how in there. I'm not sure how I can get a vTaskList using Arduino to see if anything else is running either. It seems like a watchdog is still somehow active in there. I'd really like to just disable the watchdog for Core0 completely, but within Arduino (not ESP-IDF, which I know you can do with menuconfig).

Any ideas?

Who is online

Users browsing this forum: No registered users and 7 guests