stm32-metapac

Crates

12.0.0

Versions

stm32h503kb

Flavors

Struct Pmcr

#[repr(transparent)]
pub struct Pmcr(pub u32);
Expand description

PWR power mode control register

Tuple Fields§

§0: u32

Implementations§

§

impl Pmcr

pub const fn lpms(&self) -> bool

low-power mode selection This bit defines the Deepsleep mode.

pub fn set_lpms(&mut self, val: bool)

low-power mode selection This bit defines the Deepsleep mode.

pub const fn svos(&self) -> Svos

system Stop mode voltage scaling selection These bits control the VCORE voltage level in system Stop mode, to obtain the best trade-off between power consumption and performance.

pub fn set_svos(&mut self, val: Svos)

system Stop mode voltage scaling selection These bits control the VCORE voltage level in system Stop mode, to obtain the best trade-off between power consumption and performance.

pub const fn cssf(&self) -> bool

clear Standby and Stop flags (always read as 0) This bit is cleared to 0 by hardware.

pub fn set_cssf(&mut self, val: bool)

clear Standby and Stop flags (always read as 0) This bit is cleared to 0 by hardware.

pub const fn flps(&self) -> bool

Flash memory low-power mode in Stop mode This bit is used to obtain the best trade-off between low-power consumption and restart time when exiting from Stop mode. When it is set, the Flash memory enters low-power mode when the CPU domain is in Stop mode. Note: When system enters stop mode with SVOS5 enabled, Flash memory is automatically forced in low-power mode.

pub fn set_flps(&mut self, val: bool)

Flash memory low-power mode in Stop mode This bit is used to obtain the best trade-off between low-power consumption and restart time when exiting from Stop mode. When it is set, the Flash memory enters low-power mode when the CPU domain is in Stop mode. Note: When system enters stop mode with SVOS5 enabled, Flash memory is automatically forced in low-power mode.

pub const fn booste(&self) -> bool

analog switch VBOOST control This bit enables the booster to guarantee the analog switch AC performance when the VDD supply voltage is below 2.7 V (reduction of the total harmonic distortion to have the same switch performance over the full supply voltage range) The VDD supply voltage can be monitored through the PVD and the PLS bits.

pub fn set_booste(&mut self, val: bool)

analog switch VBOOST control This bit enables the booster to guarantee the analog switch AC performance when the VDD supply voltage is below 2.7 V (reduction of the total harmonic distortion to have the same switch performance over the full supply voltage range) The VDD supply voltage can be monitored through the PVD and the PLS bits.

pub const fn avd_ready(&self) -> bool

analog voltage ready This bit is only used when the analog switch boost needs to be enabled (see BOOSTE bit). It must be set by software when the expected VDDA analog supply level is available. The correct analog supply level is indicated by the AVDO bit (PWR_VMSR register) after setting the AVDEN bit (PWR_VMCR register) and selecting the supply level to be monitored (ALS bits).

pub fn set_avd_ready(&mut self, val: bool)

analog voltage ready This bit is only used when the analog switch boost needs to be enabled (see BOOSTE bit). It must be set by software when the expected VDDA analog supply level is available. The correct analog supply level is indicated by the AVDO bit (PWR_VMSR register) after setting the AVDEN bit (PWR_VMCR register) and selecting the supply level to be monitored (ALS bits).

pub const fn sram2so(&self) -> bool

AHB SRAM2 shut-off in Stop mode.

pub fn set_sram2so(&mut self, val: bool)

AHB SRAM2 shut-off in Stop mode.

pub const fn sram1so(&self) -> bool

AHB SRAM1 shut-off in Stop mode

pub fn set_sram1so(&mut self, val: bool)

AHB SRAM1 shut-off in Stop mode

Trait Implementations§

§

impl Clone for Pmcr

§

fn clone(&self) -> Pmcr

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Default for Pmcr

§

fn default() -> Pmcr

Returns the “default value” for a type. Read more
§

impl PartialEq for Pmcr

§

fn eq(&self, other: &Pmcr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for Pmcr

§

impl Eq for Pmcr

§

impl StructuralPartialEq for Pmcr

Auto Trait Implementations§

§

impl Freeze for Pmcr

§

impl RefUnwindSafe for Pmcr

§

impl Send for Pmcr

§

impl Sync for Pmcr

§

impl Unpin for Pmcr

§

impl UnwindSafe for Pmcr

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.