lightsleep results in machine reset on ESP32
Hello,
I'm running this version of MicroPython on ESP32:
MicroPython v1.12-262-g19ea30bdd on 2020-03-20; ESP32 module with ESP32
And I'm observing unexpected behavior with machine.lightsleep().
I would expect the following program code:
import machine
import time
while True:
machine.lightsleep(10)
to behave in the same way as:
import machine
import time
while True:
time.sleep_ms(10)
However, the prior always results in a WDT reset on my platform:
>>> import machine;
>>> while True:
... machine.lightsleep(10);
...
...
...
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
This seems like a bug in machine.lightsleep(), as I can reproduce this with any value given to lightsleep, and even performing consecutive machine.lightsleep(100); calls directly without a loop.
ESP32 timer wake up repeating
I'm using timer wakeup from light sleep with:
machine.lightsleep(30000) #sleep 30s
after 30 the esp32 wakes, disable peripherals and sleep indefinitely with:
machine.lightsleep()
but the 30s wake timer keeps repeating and didn't find any way to disable wake source