Struct Cr2
#[repr(transparent)]pub struct Cr2(pub u32);Expand description
PWR control register 2.
Tuple Fields§
§0: u32Implementations§
§impl Cr2
impl Cr2
pub const fn sram1pds(&self, n: usize) -> Pds
pub const fn sram1pds(&self, n: usize) -> Pds
SRAM1 page x power-down in Stop 1, Stop 2, and Stop 3 modes. Pages 1 to 2 are 16 Kbytes, pages 3 to 7 are 32 Kbytes. Pages 6 and 7 are not available on STM32U356/366.
pub const fn set_sram1pds(&mut self, n: usize, val: Pds)
pub const fn set_sram1pds(&mut self, n: usize, val: Pds)
SRAM1 page x power-down in Stop 1, Stop 2, and Stop 3 modes. Pages 1 to 2 are 16 Kbytes, pages 3 to 7 are 32 Kbytes. Pages 6 and 7 are not available on STM32U356/366.
pub const fn sram3pds(&self, n: usize) -> Pds
pub const fn sram3pds(&self, n: usize) -> Pds
SRAM3 page x (64 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. Only available on STM32U3B5/3C5.
pub const fn set_sram3pds(&mut self, n: usize, val: Pds)
pub const fn set_sram3pds(&mut self, n: usize, val: Pds)
SRAM3 page x (64 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. Only available on STM32U3B5/3C5.
pub const fn sram2pds1(&self) -> Pds
pub const fn sram2pds1(&self) -> Pds
SRAM2 page 1 (32 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 1 content retained in Stop modes 1: SRAM2 page 1 content lost in Stop modes.
pub const fn set_sram2pds1(&mut self, val: Pds)
pub const fn set_sram2pds1(&mut self, val: Pds)
SRAM2 page 1 (32 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 1 content retained in Stop modes 1: SRAM2 page 1 content lost in Stop modes.
pub const fn sram2pds2(&self) -> Pds
pub const fn sram2pds2(&self) -> Pds
SRAM2 page 2 (24 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 2 content retained in Stop modes 1: SRAM2 page 2 content lost in Stop modes.
pub const fn set_sram2pds2(&mut self, val: Pds)
pub const fn set_sram2pds2(&mut self, val: Pds)
SRAM2 page 2 (24 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 2 content retained in Stop modes 1: SRAM2 page 2 content lost in Stop modes.
pub const fn sram2pds3(&self) -> Pds
pub const fn sram2pds3(&self) -> Pds
SRAM2 page 3 (8 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 3 content retained in Stop modes 1: SRAM2 page 3 content lost in Stop modes.
pub const fn set_sram2pds3(&mut self, val: Pds)
pub const fn set_sram2pds3(&mut self, val: Pds)
SRAM2 page 3 (8 Kbytes) power-down in Stop 1, Stop 2, and Stop 3 modes. 0: SRAM2 page 3 content retained in Stop modes 1: SRAM2 page 3 content lost in Stop modes.
pub const fn sram4pds(&self) -> Pds
pub const fn sram4pds(&self) -> Pds
SRAM4 power-down in Stop 1, Stop 2, and Stop 3 modes. Only available on STM32U3B5/3C5.
pub const fn set_sram4pds(&mut self, val: Pds)
pub const fn set_sram4pds(&mut self, val: Pds)
SRAM4 power-down in Stop 1, Stop 2, and Stop 3 modes. Only available on STM32U3B5/3C5.
pub const fn icrampds(&self) -> Pds
pub const fn icrampds(&self) -> Pds
ICACHE SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: ICACHE SRAM content retained in Stop modes 1: ICACHE SRAM content lost in Stop modes.
pub const fn set_icrampds(&mut self, val: Pds)
pub const fn set_icrampds(&mut self, val: Pds)
ICACHE SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: ICACHE SRAM content retained in Stop modes 1: ICACHE SRAM content lost in Stop modes.
pub const fn prampds(&self) -> Pds
pub const fn prampds(&self) -> Pds
FDCAN and USB SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: FDCAN and USB peripherals SRAM content retained in Stop modes 1: FDCAN and USB peripherals SRAM content lost in Stop modes.
pub const fn set_prampds(&mut self, val: Pds)
pub const fn set_prampds(&mut self, val: Pds)
FDCAN and USB SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: FDCAN and USB peripherals SRAM content retained in Stop modes 1: FDCAN and USB peripherals SRAM content lost in Stop modes.
pub const fn pkarampds(&self) -> Pds
pub const fn pkarampds(&self) -> Pds
PKA SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: PKA SRAM content retained in Stop modes 1: PKA SRAM content lost in Stop modes.
pub const fn set_pkarampds(&mut self, val: Pds)
pub const fn set_pkarampds(&mut self, val: Pds)
PKA SRAM power-down in Stop 1, Stop 2, and Stop 3 modes. 0: PKA SRAM content retained in Stop modes 1: PKA SRAM content lost in Stop modes.
pub const fn sramfwu(&self) -> Sramfwu
pub const fn sramfwu(&self) -> Sramfwu
This bit is used to obtain the best trade-off between low-power consumption and wakeup time. SRAMs wakeup time increases the wakeup time when exiting Stop 0 and 1 modes, and also increases the GPDMA1 access time to SRAMs during Stop modes. 0: SRAMs enters low-power mode in Stop 0 and Stop 1 modes (source biasing for lower-power consumption). 1: SRAMs remains in normal mode in Stop 0 and Stop 1 modes (higher consumption but no SRAM wakeup time). Note: in case one or several SRAMs are configured to be in power-down in Stop mode, setting SRAMFWU bit has no effect.
pub const fn set_sramfwu(&mut self, val: Sramfwu)
pub const fn set_sramfwu(&mut self, val: Sramfwu)
This bit is used to obtain the best trade-off between low-power consumption and wakeup time. SRAMs wakeup time increases the wakeup time when exiting Stop 0 and 1 modes, and also increases the GPDMA1 access time to SRAMs during Stop modes. 0: SRAMs enters low-power mode in Stop 0 and Stop 1 modes (source biasing for lower-power consumption). 1: SRAMs remains in normal mode in Stop 0 and Stop 1 modes (higher consumption but no SRAM wakeup time). Note: in case one or several SRAMs are configured to be in power-down in Stop mode, setting SRAMFWU bit has no effect.
pub const fn flashfwu(&self) -> Flashfwu
pub const fn flashfwu(&self) -> Flashfwu
This bit is used to obtain the best trade-off between low-power consumption and wakeup time when exiting the Stop 0 or Stop 1 modes. When this bit is set, the Flash memory remains in normal mode in Stop 0 and Stop 1 modes, which offers a faster startup time with higher consumption. 0: Flash memory enters low-power mode in Stop 0 and Stop 1 modes (lower-power consumption). 1: Flash memory remains in normal mode in Stop 0 and Stop 1 modes (faster wakeup time).
pub const fn set_flashfwu(&mut self, val: Flashfwu)
pub const fn set_flashfwu(&mut self, val: Flashfwu)
This bit is used to obtain the best trade-off between low-power consumption and wakeup time when exiting the Stop 0 or Stop 1 modes. When this bit is set, the Flash memory remains in normal mode in Stop 0 and Stop 1 modes, which offers a faster startup time with higher consumption. 0: Flash memory enters low-power mode in Stop 0 and Stop 1 modes (lower-power consumption). 1: Flash memory remains in normal mode in Stop 0 and Stop 1 modes (faster wakeup time).