embassy-stm32

Crates

git

Versions

stm32h725ag

Flavors

Skip to main content

reset_flags

Function reset_flags 

Source
pub fn reset_flags() -> ResetFlags
Expand description

Returns the flags describing what caused the most recent reset.

The first call reads the flags from RCC and clears them in hardware, so the next reset starts from a clean state. The value is cached, and later calls return the same flags for the rest of this boot.

Until this is called, the flags are left untouched in hardware. If something that ran before the application (for example a bootloader) calls this function or otherwise clears the flags, the application will see them empty.

More than one flag is often set for a single reset. See the individual methods on ResetFlags for details.

On dual-core chips, call this from one core only.