ESP32 WDT Timeout on Core 0

Just wanted to provide an update for anyone following this thread…

Following communications with Espressif, I learned this “Interrupt WDT timeout on Core 0” was specifically related to spending too much time in an interrupt handler. In my case, it turned out to be related to the UART handler.

Further diagnostics proved that one of the API calls for the Espressif web-server interface was blocking my code for up to 250ms. During that time, my task was blocked and was unable to service the software buffer for the UART at all. Once my 2KB circular software buffer had reached its storage limit, subsequent calls to the interrupt handler were unable to empty the hardware FIFO since there was no storage left to save it to. Although the interrupt request was being cleared, the handler became re-entrant due to the persistent FIFO full status.

I had to modify my code to make the circular buffer large enough to ride through these large periods of blocking activity. Additionally, I modified the UART interrupt handler to flush the hardware FIFO and set a buffer overflow flag if I encounter a buffer overrun condition in the future. Once these changes were done, the problems disappeared.

I hope this detail helps someone else encountering these issues…

Thanks for your help!