Type Alias rp2040_pac::vreg_and_chip_reset::chip_reset::R

source ·
pub type R = R<CHIP_RESET_SPEC>;
Expand description

Register CHIP_RESET reader

Aliased Type§

struct R { /* private fields */ }

Implementations§

source§

impl R

source

pub fn had_por(&self) -> HAD_POR_R

Bit 8 - Last reset was from the power-on reset or brown-out detection blocks

source

pub fn had_run(&self) -> HAD_RUN_R

Bit 16 - Last reset was from the RUN pin

source

pub fn had_psm_restart(&self) -> HAD_PSM_RESTART_R

Bit 20 - Last reset was from the debug port

source

pub fn psm_restart_flag(&self) -> PSM_RESTART_FLAG_R

Bit 24 - This is set by psm_restart from the debugger.
Its purpose is to branch bootcode to a safe mode when the debugger has issued a psm_restart in order to recover from a boot lock-up.
In the safe mode the debugger can repair the boot code, clear this flag then reboot the processor.