ESP32: deep sleep seems to cut clock to ULP processor
It seems like going to deep sleep stops the ULP processor. I uploaded a counter code to the ULP and it counts nicely as long as main CPUs running. When going to deep sleep counting stops but the counter value remains so the ULP was not reset or memory erased. After coming back from deep sleep counting works again.
As a side note: I would like to suggest to also add the ULP as a wakeup source in the esp32 package (in addition to the EXT, timer and touch options).
NodeMCU v1.0 stuck at deep sleep rtc wakeup
Following the docs i tried the deep sleep example
import machine
# configure RTC.ALARM0 to be able to wake the device
rtc = machine.RTC()
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
# check if the device woke from a deep sleep
if machine.reset_cause() == machine.DEEPSLEEP_RESET:
print('woke from a deep sleep')
# set RTC.ALARM0 to fire after 10 seconds (waking the device)
rtc.alarm(rtc.ALARM0, 10000)
# put the device to sleep
machine.deepsleep()
but when it wakes up it gets stuck in booting and doesn't let me erase the flash memmory or anything cause everytime i reset the device it keeps "waking up" from deep sleep and it enters to it once again.
I have tried the esptool.py to erase memory but it doesn't find the device with the usbserial converter nor usb.