Hey Franciso!
Thanks for your comprehensive reply! Nevertheless I think, we have some type of misunderstanding here.
FRANCISCO2020 wrote: ↑Wed Jan 04, 2023 10:39 am
It is not advisable to remove the RTC
The RTC watchdog timer plays an important role in ensuring the stability and reliability of your ESP32-based system. It works by resetting the ESP32 if it is not serviced within a certain amount of time, which can help to recover from certain types of failures or issues that might otherwise cause the system to become unresponsive. [...]
You seem to talk about the Task Watchdog Timer (
TWDT (Click me)). The TWDT monitors the running of the app, the RTC Watchdog only monitors the start up / boot as described
here (Click me). This is the reason why it deactivates
itself before starting my main code. I don't deactivate the RTC-WDT the ESP32-Boot-Code does it itself
This is the reason I am surprised it seems to be still activated during normal program run.
FRANCISCO2020 wrote: ↑Wed Jan 04, 2023 10:39 am
Secondly:
The value 16 is the numeric code for the RTCWDT_RTC_RESET reset reason, which means that the RTC watchdog timer reset the ESP32 because the RTC watchdog timer was not serviced within the specified time period. This could happen if the program gets stuck in an infinite loop or if the program is not running fast enough to service the watchdog timer regularly.
I could give it a try and manually reset the RTC WDT regularly, but I have no clue how to reset it :/ There isn't that much information in the web about the RTC WDT...
FRANCISCO2020 wrote: ↑Wed Jan 04, 2023 10:39 am
To determine the exact cause of this reset, you will need to [...] enable debugging and examine the log output[...]
I already tried to do so, but it is hard to get the serial output, if the error raises randomly hours after program start
That's why I connected a serial sniffer uploading the serial data of my problematic ESP into the Internet. But it doesn't log that much during boot. I only get one line before my code output starts:
$<�$�"$$�$8�'�#$$�$$ ��b$���';b##<�"#8��<�#<�##�<�#$;����''8.�"$8�'"�'|bp�'#�'<"$8�'"'<"��<�$�$[ 11][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
My debug level is 5 to get as much information as possible, I think thats why I see this line. Does the ESP-Log get send with another baudrate, so my sniffer fails to record the ESP boot log? That will be hard to detect for my Sniffer
FRANCISCO2020 wrote: ↑Wed Jan 04, 2023 10:39 am
What's more:
[...] Another part of the program might re-enable the RTC watchdog timer: [...]
This is possible. I don't reactivate it directly. Of course, it could be possible, that some of the libraries (wifi, serial, DHT22, SD, external RTC, etc.) could reactivate the Watchdog. Maybe I'll check regularly if the RTC WDT is getting activated again... I think there should be an option, to check if the WDT is active or not.
FRANCISCO2020 wrote: ↑Wed Jan 04, 2023 10:39 am
There may be a problem with the RTC module itself: If there is a problem with the RTC module, it could cause the RTC watchdog timer to trigger a reset, even if it's supposed to be disabled. This could be due to a hardware problem, or it could be due to a problem with the RTC settings.
I never configure the RTC WTD by myself. So such a problem would be a bug in the main ESP32 code
Again: Thanks for your reply! I get some ideas, how to continue! Maybe someone knows some more reasons, why this error will be triggered?
Best regards
Julian