I have a pretty big sketch that has intermitand crashes after several hours.
If a crash has occured the ESP32 keeps on rebooting. So storing values into flash will quickly wear-out the flash-memory (I had 33000 reboots over night)
For narrowing down the problem I would like store data into the RTC-RAM
I did some tests but the data in RTC-RAM gets lost over a ESP.restart() or a resetbutton reboot.
So is there a way to avoid erasing the RTC-RAM during a reset?
Of course I can connect some FRAM to my ESP32 which has billions of writecycles
or I can add a second serial interface that sends data whch will be recorded in a logfile
but I would like to avoid this.
that's just what I want to do "find the cause of the crash and eliminate it" by storing different numbers on different places of my code and to look at what number is stored after reboot.
No no clues yet. I don't use String program runs for hours than suddenly a crash
best regards Stefan
to add information: This is a ESP32-nodeMCU-Board build into a box where it requires to dismount the box to get access to the USB-socket. I'm using elegantOTA for updating the program.
This has worked very good so far. And this is the reason why I haven't added the serial-output from the ESP32 right at bootstart.
For "normal" debugoutput I use webserial and UDP-messages. But right after booting they aren't yet available.
So I guess I will indeed dismout everything connecting an USB-wire to be able to see what the serial output is right on boot.
running 12 hours quickly rebooting starts,
next round running 5 hours quickly rebooting starts,
running 12 hours ... in how long the time is the program is running normally and then starts hanging in a quick-reboot-loop,
there seems to be no pattern.