pub struct Powman { /* private fields */ }
Expand description
Controls vreg, bor, lposc, chip resets & xosc startup, powman and provides scratch register for general use and for bootcode use
Implementations§
source§impl Powman
impl Powman
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
sourcepub const fn vreg_lp_entry(self) -> Reg<VregLpEntry, RW>
pub const fn vreg_lp_entry(self) -> Reg<VregLpEntry, RW>
Voltage Regulator Low Power Entry Settings
sourcepub const fn vreg_lp_exit(self) -> Reg<VregLpExit, RW>
pub const fn vreg_lp_exit(self) -> Reg<VregLpExit, RW>
Voltage Regulator Low Power Exit Settings
sourcepub const fn bod_lp_entry(self) -> Reg<BodLpEntry, RW>
pub const fn bod_lp_entry(self) -> Reg<BodLpEntry, RW>
Brown-out Detection Low Power Entry Settings
sourcepub const fn bod_lp_exit(self) -> Reg<BodLpExit, RW>
pub const fn bod_lp_exit(self) -> Reg<BodLpExit, RW>
Brown-out Detection Low Power Exit Settings
sourcepub const fn chip_reset(self) -> Reg<ChipReset, RW>
pub const fn chip_reset(self) -> Reg<ChipReset, RW>
Chip reset control and status
sourcepub const fn wdsel(self) -> Reg<Wdsel, RW>
pub const fn wdsel(self) -> Reg<Wdsel, RW>
Allows a watchdog reset to reset the internal state of powman in addition to the power-on state machine (PSM). Note that powman ignores watchdog resets that do not select at least the CLOCKS stage or earlier stages in the PSM. If using these bits, it’s recommended to set PSM_WDSEL to all-ones in addition to the desired bits in this register. Failing to select CLOCKS or earlier will result in the POWMAN_WDSEL register having no effect.
sourcepub const fn seq_cfg(self) -> Reg<SeqCfg, RW>
pub const fn seq_cfg(self) -> Reg<SeqCfg, RW>
For configuration of the power sequencer Writes are ignored while POWMAN_STATE_CHANGING=1
sourcepub const fn state(self) -> Reg<State, RW>
pub const fn state(self) -> Reg<State, RW>
This register controls the power state of the 4 power domains. The current power state is indicated in POWMAN_STATE_CURRENT which is read-only. To change the state, write to POWMAN_STATE_REQ. The coding of POWMAN_STATE_CURRENT & POWMAN_STATE_REQ corresponds to the power states defined in the datasheet: bit 3 = SWCORE bit 2 = XIP cache bit 1 = SRAM0 bit 0 = SRAM1 0 = powered up 1 = powered down When POWMAN_STATE_REQ is written, the POWMAN_STATE_WAITING flag is set while the Power Manager determines what is required. If an invalid transition is requested the Power Manager will still register the request in POWMAN_STATE_REQ but will also set the POWMAN_BAD_REQ flag. It will then implement the power-up requests and ignore the power down requests. To do nothing would risk entering an unrecoverable lock-up state. Invalid requests are: any combination of power up and power down requests any request that results in swcore boing powered and xip unpowered If the request is to power down the switched-core domain then POWMAN_STATE_WAITING stays active until the processors halt. During this time the POWMAN_STATE_REQ field can be re-written to change or cancel the request. When the power state transition begins the POWMAN_STATE_WAITING_flag is cleared, the POWMAN_STATE_CHANGING flag is set and POWMAN register writes are ignored until the transition completes.
pub const fn pow_fastdiv(self) -> Reg<PowFastdiv, RW>
sourcepub const fn ext_ctrl0(self) -> Reg<ExtCtrl, RW>
pub const fn ext_ctrl0(self) -> Reg<ExtCtrl, RW>
Configures a gpio as a power mode aware control output
sourcepub const fn ext_ctrl1(self) -> Reg<ExtCtrl, RW>
pub const fn ext_ctrl1(self) -> Reg<ExtCtrl, RW>
Configures a gpio as a power mode aware control output
sourcepub const fn ext_time_ref(self) -> Reg<ExtTimeRef, RW>
pub const fn ext_time_ref(self) -> Reg<ExtTimeRef, RW>
Select a GPIO to use as a time reference, the source can be used to drive the low power clock at 32kHz, or to provide a 1ms tick to the timer, or provide a 1Hz tick to the timer. The tick selection is controlled by the POWMAN_TIMER register.
sourcepub const fn lposc_freq_khz_int(self) -> Reg<LposcFreqKhzInt, RW>
pub const fn lposc_freq_khz_int(self) -> Reg<LposcFreqKhzInt, RW>
Informs the AON Timer of the integer component of the clock frequency when running off the LPOSC.
sourcepub const fn lposc_freq_khz_frac(self) -> Reg<LposcFreqKhzFrac, RW>
pub const fn lposc_freq_khz_frac(self) -> Reg<LposcFreqKhzFrac, RW>
Informs the AON Timer of the fractional component of the clock frequency when running off the LPOSC.
sourcepub const fn xosc_freq_khz_int(self) -> Reg<XoscFreqKhzInt, RW>
pub const fn xosc_freq_khz_int(self) -> Reg<XoscFreqKhzInt, RW>
Informs the AON Timer of the integer component of the clock frequency when running off the XOSC.
sourcepub const fn xosc_freq_khz_frac(self) -> Reg<XoscFreqKhzFrac, RW>
pub const fn xosc_freq_khz_frac(self) -> Reg<XoscFreqKhzFrac, RW>
Informs the AON Timer of the fractional component of the clock frequency when running off the XOSC.
pub const fn set_time_63to48(self) -> Reg<SetTime63to48, RW>
pub const fn set_time_47to32(self) -> Reg<SetTime47to32, RW>
pub const fn set_time_31to16(self) -> Reg<SetTime31to16, RW>
pub const fn set_time_15to0(self) -> Reg<SetTime15to0, RW>
pub const fn read_time_upper(self) -> Reg<u32, RW>
pub const fn read_time_lower(self) -> Reg<u32, RW>
pub const fn alarm_time_63to48(self) -> Reg<AlarmTime63to48, RW>
pub const fn alarm_time_47to32(self) -> Reg<AlarmTime47to32, RW>
pub const fn alarm_time_31to16(self) -> Reg<AlarmTime31to16, RW>
pub const fn alarm_time_15to0(self) -> Reg<AlarmTime15to0, RW>
pub const fn timer(self) -> Reg<Timer, RW>
sourcepub const fn pwrup(self, n: usize) -> Reg<Pwrup, RW>
pub const fn pwrup(self, n: usize) -> Reg<Pwrup, RW>
4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high
sourcepub const fn current_pwrup_req(self) -> Reg<CurrentPwrupReq, RW>
pub const fn current_pwrup_req(self) -> Reg<CurrentPwrupReq, RW>
Indicates current powerup request state pwrup events can be cleared by removing the enable from the pwrup register. The alarm pwrup req can be cleared by clearing timer.alarm_enab 0 = chip reset, for the source of the last reset see POWMAN_CHIP_RESET 1 = pwrup0 2 = pwrup1 3 = pwrup2 4 = pwrup3 5 = coresight_pwrup 6 = alarm_pwrup
sourcepub const fn last_swcore_pwrup(self) -> Reg<LastSwcorePwrup, RW>
pub const fn last_swcore_pwrup(self) -> Reg<LastSwcorePwrup, RW>
Indicates which pwrup source triggered the last switched-core power up 0 = chip reset, for the source of the last reset see POWMAN_CHIP_RESET 1 = pwrup0 2 = pwrup1 3 = pwrup2 4 = pwrup3 5 = coresight_pwrup 6 = alarm_pwrup
pub const fn dbg_pwrcfg(self) -> Reg<DbgPwrcfg, RW>
sourcepub const fn bootdis(self) -> Reg<Bootdis, RW>
pub const fn bootdis(self) -> Reg<Bootdis, RW>
Tell the bootrom to ignore the BOOT0..3 registers following the next RSM reset (e.g. the next core power down/up). If an early boot stage has soft-locked some OTP pages in order to protect their contents from later stages, there is a risk that Secure code running at a later stage can unlock the pages by powering the core up and down. This register can be used to ensure that the bootloader runs as normal on the next power up, preventing Secure code at a later stage from accessing OTP in its unlocked state. Should be used in conjunction with the OTP BOOTDIS register.
pub const fn dbgconfig(self) -> Reg<Dbgconfig, RW>
sourcepub const fn scratch(self, n: usize) -> Reg<u32, RW>
pub const fn scratch(self, n: usize) -> Reg<u32, RW>
Scratch register. Information persists in low power mode
Trait Implementations§
impl Copy for Powman
impl Eq for Powman
impl Send for Powman
impl StructuralPartialEq for Powman
impl Sync for Powman
Auto Trait Implementations§
impl Freeze for Powman
impl RefUnwindSafe for Powman
impl Unpin for Powman
impl UnwindSafe for Powman
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)