cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.72k stars 402 forks source link

Watchdog resets occur with chip type ESP32D0WDQ6 revision 0 #145

Closed cyberman54 closed 5 years ago

cyberman54 commented 6 years ago

With ESP32 chip type ESP32D0WDQ6 revision 0 on a HELTEC board repeated watchdog resets occur, causing to starve the main program loop, including display refresh and LED control:

Task watchdog got triggered. The following tasks did not reset the watchdog in time:
 - IDLE (CPU 0)

The same code runs on chip type ESP32D0WDQ6 revision 1 without this error.

After disabling the OLED display in code the error does not occur with revision 0.

Root cause for this is totally unknown so far.

cyberman54 commented 5 years ago

With old Lopy (no Lopy4) with chip type revision 0 sometimes the above watchdog error occurs, and sometimes the Arduino main task (loop-function) seems to be blocked and is not running but not watchdog resets are shown in the console.

No idea what goes wrong here.

cyberman54 commented 5 years ago

Fixed by changing some RTos time critical lines in code; seems to solve this issue, but don't know exactly why.