Struct stm32_metapac::pwr::regs::Cr1
#[repr(transparent)]pub struct Cr1(pub u32);
Expand description
Power control register 1
Tuple Fields§
§0: u32
Implementations§
§impl Cr1
impl Cr1
pub const fn lpms(&self) -> Lpms
pub const fn lpms(&self) -> Lpms
Low-power mode selection These bits select the low-power mode entered when CPU enters the deepsleep mode. 1xx: Shutdown mode Note: If LPR bit is set, Stop 2 mode cannot be selected and Stop 1 mode shall be entered instead of Stop 2. Note: In Standby mode, SRAM2 can be preserved or not, depending on RRS bit configuration in PWR_CR3.
pub fn set_lpms(&mut self, val: Lpms)
pub fn set_lpms(&mut self, val: Lpms)
Low-power mode selection These bits select the low-power mode entered when CPU enters the deepsleep mode. 1xx: Shutdown mode Note: If LPR bit is set, Stop 2 mode cannot be selected and Stop 1 mode shall be entered instead of Stop 2. Note: In Standby mode, SRAM2 can be preserved or not, depending on RRS bit configuration in PWR_CR3.
pub const fn fpd_stop(&self) -> bool
pub const fn fpd_stop(&self) -> bool
Flash memory powered down during Stop mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Stop mode.
pub fn set_fpd_stop(&mut self, val: bool)
pub fn set_fpd_stop(&mut self, val: bool)
Flash memory powered down during Stop mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Stop mode.
pub const fn fpd_lprun(&self) -> bool
pub const fn fpd_lprun(&self) -> bool
Flash memory powered down during Low-power run mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power sleep mode.
pub fn set_fpd_lprun(&mut self, val: bool)
pub fn set_fpd_lprun(&mut self, val: bool)
Flash memory powered down during Low-power run mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power sleep mode.
pub const fn fpd_lpslp(&self) -> bool
pub const fn fpd_lpslp(&self) -> bool
Flash memory powered down during Low-power sleep mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power sleep mode.
pub fn set_fpd_lpslp(&mut self, val: bool)
pub fn set_fpd_lpslp(&mut self, val: bool)
Flash memory powered down during Low-power sleep mode. This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power sleep mode.
pub const fn dbp(&self) -> bool
pub const fn dbp(&self) -> bool
Disable backup domain write protection In reset state, the RTC and backup registers are protected against parasitic write access. This bit must be set to enable write access to these registers.
pub fn set_dbp(&mut self, val: bool)
pub fn set_dbp(&mut self, val: bool)
Disable backup domain write protection In reset state, the RTC and backup registers are protected against parasitic write access. This bit must be set to enable write access to these registers.