Any way to diff power startup with recovering from deep sleep.

charlieyang
Posts: 2
Joined: Mon Dec 09, 2019 12:04 pm

Any way to diff power startup with recovering from deep sleep.

Postby charlieyang » Fri Dec 13, 2019 5:10 am

Hi all !

I'd like to add some special operations to setup() functions but I don't want to invoke them when the device is recovered from a deep sleep. Since deep sleep turns off all the device except the RTC, the program will be totally restarted after deep sleep. Is there any indicator (variables, system call?) to identify the exact status?

Thanks!

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Any way to diff power startup with recovering from deep sleep.

Postby martinayotte » Fri Dec 13, 2019 3:17 pm

rtc_get_reset_reason() from "rom/rtc.h"

https://github.com/espressif/arduino-es ... .h#L82-L99

Who is online

Users browsing this forum: No registered users and 86 guests