← index #6071PR #12782
Related · high · value 5.102
QUERY · ISSUE

ESP32 - EN pin when in Deep Sleep State

openby hpereira98opened 2020-05-24updated 2020-05-28
port-esp32

When my board is in deep sleep state ( machine.deepsleep() ), when I press the EN button the machine.reset_cause() returns the machine.PWRON_RESET instead of the machine.DEEPSLEEP_RESET. Is this supposed to happen? How can I get the machine.DEEPSLEEP_RESET by pressing a button?

I tried the embedded EN button and connecting a physical button to the EN pin.

CANDIDATE · PULL REQUEST

esp32 : fix for #7158 - machine.deepsleep() not behaving as expected

mergedby PBrunotopened 2023-10-23updated 2023-10-31
port-esp32

This PR fixes machine.deepsleep() waking up the board after a delay d, for example when a machine.lightsleep(d) call was issued previously. This is because previous wake-sources remain active, whereas machine.deepsleep() shall put the board to sleep forever as per the
machine.deepsleep documentation

See #7158 for more details on : issue description, reproduction steps and fix implementation.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied