Page 1 of 1

How to detect boot type (ESP32 S3)

Posted: Tue Apr 22, 2025 2:29 pm
by monaco87
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. I've noticed the following on the serial console:

Power On or Reset Button: console shows

Code: Select all

rst:0x1 (POWERON)
WDT reboot : console shows

Code: Select all

rst:0xc (RTC_SW_CPU_RST)
Is there any way to read these parameters 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

Re: How to detect boot type (ESP32 S3)

Posted: Wed Apr 23, 2025 2:16 am
by Sprite
You should be able to call esp_reset_reason() from Arduino as well.

Re: How to detect boot type (ESP32 S3)

Posted: Wed Apr 23, 2025 6:36 am
by lbernstone