I have a project that also includes a Task Watch Dog Timer (WDT) timeout to prevent lockup. What I'm trying to do is detect at boot time what sort of restart is happening, whether its a normal boot/reset or a WDT reset. I've noticed the following boot messages on the serial console:
Power On or Reset Button: console shows rst:0x1 (POWERON)
WDT reboot : console shows rst:0xc (RTC_SW_CPU_RST)
Is there any way to read these parameters and bootloader messages from software at boot time in the Arduino environment to detect the boot type?
I want to customise the Arduino setup() differently for each.
Thanks