pub struct ResetFlags(pub u32);Expand description
The flags describing what caused the most recent reset, returned by reset_flags.
Which flags are available depends on the chip family.
Tuple Fields§
§0: u32Implementations§
Source§impl ResetFlags
impl ResetFlags
Sourcepub fn nrst_pin(&self) -> bool
pub fn nrst_pin(&self) -> bool
The NRST pin was pulled low.
On many STM32 chips, internal reset sources can also drive NRST low, so this flag is commonly set together with other flags. Check the more specific flags first.
Sourcepub fn software(&self) -> bool
pub fn software(&self) -> bool
A software reset was requested, for example with SCB::sys_reset().
Sourcepub fn independent_watchdog(&self) -> bool
pub fn independent_watchdog(&self) -> bool
The independent watchdog expired.
Sourcepub fn window_watchdog(&self) -> bool
pub fn window_watchdog(&self) -> bool
The window watchdog expired.
Sourcepub fn low_power(&self) -> bool
pub fn low_power(&self) -> bool
Illegal entry into a low-power mode.
This happens when Stop or Standby mode is entered while the corresponding nRST option bits are configured to generate a reset instead.
Sourcepub fn power_on(&self) -> bool
pub fn power_on(&self) -> bool
A power-on or power-down reset (POR/PDR).
Other flags are usually set along with it, so check this first.
Sourcepub fn brownout(&self) -> bool
pub fn brownout(&self) -> bool
A brownout reset (BOR).
On many families a power-on reset also sets this flag. Where power_on() is
available, check it first.
Sourcepub fn cpu(&self) -> bool
pub fn cpu(&self) -> bool
The CPU was reset. On dual-core chips, this is the Cortex-M7.
Most resets set this along with other flags. It is set on its own when only the CPU was reset.
Trait Implementations§
Source§impl Clone for ResetFlags
impl Clone for ResetFlags
Source§fn clone(&self) -> ResetFlags
fn clone(&self) -> ResetFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more