embassy-mspm0

Crates

git

Versions

mspm0g1519pm

Flavors

read_reset_cause

Function read_reset_cause 

Source
pub fn read_reset_cause() -> Result<ResetCause, u8>
Expand description

Read the reset cause from the SYSCTL.RSTCAUSE register.

This function reads the reset cause register which indicates why the last system reset occurred. The register is automatically cleared after being read, so this should be called only once per application startup.

If the reset cause is not recognized, an Err containing the raw value is returned.