Expand description
§Hardware and Software Reset
§Overview
The Hardware and Software Reset module provides functions for performing hardware and software resets on ESP chips. It also includes functions for retrieving the reset reason and the wakeup cause after a reset.
The module defines a set of sleep sources (SleepSource
) that indicate the
source of the wakeup event. These sources include:
- external signals
- timers
- touchpads
- ULP programs
- GPIOs
- UART
- Wi-Fi
- COCPU interrupts
- BT (Bluetooth)
The module also includes a set of flags (WakeupReason
) that represent
different wakeup sources and enable/disable wakeup triggers for specific
events such as:
- GPIO
- timers
- UART
- touch sensors
- ULP
- Wi-Fi
- BT
Enums§
Functions§
- get_
reset_ reason - Retrieves the reason for the last reset as a SocResetReason enum value.
Returns
None
if the reset reason cannot be determined. - get_
wakeup_ cause - Retrieves the cause of the last wakeup event as a SleepSource enum value.
- software_
reset - Performs a software reset on the chip.
- software_
reset_ cpu - Performs a software reset on the CPU.