#[repr(transparent)]pub struct State(pub u32);
Expand description
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.
Tuple Fields§
§0: u32
Implementations§
Source§impl State
impl State
pub const fn current(&self) -> u8
pub fn set_current(&mut self, val: u8)
pub const fn req(&self) -> u8
pub fn set_req(&mut self, val: u8)
pub const fn req_ignored(&self) -> bool
pub fn set_req_ignored(&mut self, val: bool)
Sourcepub const fn pwrup_while_waiting(&self) -> bool
pub const fn pwrup_while_waiting(&self) -> bool
Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down.
Sourcepub fn set_pwrup_while_waiting(&mut self, val: bool)
pub fn set_pwrup_while_waiting(&mut self, val: bool)
Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down.
Sourcepub const fn bad_sw_req(&self) -> bool
pub const fn bad_sw_req(&self) -> bool
Bad software initiated state request. No action taken.
Sourcepub fn set_bad_sw_req(&mut self, val: bool)
pub fn set_bad_sw_req(&mut self, val: bool)
Bad software initiated state request. No action taken.
Sourcepub const fn bad_hw_req(&self) -> bool
pub const fn bad_hw_req(&self) -> bool
Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)
Sourcepub fn set_bad_hw_req(&mut self, val: bool)
pub fn set_bad_hw_req(&mut self, val: bool)
Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)