Struct Svmcr
#[repr(transparent)]pub struct Svmcr(pub u32);Expand description
PWR supply voltage monitoring control register.
Tuple Fields§
§0: u32Implementations§
§impl Svmcr
impl Svmcr
pub const fn pvdls(&self) -> Pvdls
pub const fn pvdls(&self) -> Pvdls
These bits select the voltage threshold detected by the PVD: 000: VPVD0 around 2.0V 001: VPVD1 around 2.2V 010: VPVD2 around 2.4V 011: VPVD3 around 2.5V 100: VPVD4 around 2.6V 101: VPVD5 around 2.8V 110: VPVD6 around 2.9V 111: External input analog voltage PVD_IN (compared internally to VREFINT).
pub fn set_pvdls(&mut self, val: Pvdls)
pub fn set_pvdls(&mut self, val: Pvdls)
These bits select the voltage threshold detected by the PVD: 000: VPVD0 around 2.0V 001: VPVD1 around 2.2V 010: VPVD2 around 2.4V 011: VPVD3 around 2.5V 100: VPVD4 around 2.6V 101: VPVD5 around 2.8V 110: VPVD6 around 2.9V 111: External input analog voltage PVD_IN (compared internally to VREFINT).
pub const fn uvmen(&self) -> bool
pub const fn uvmen(&self) -> bool
None 0: VDDUSB voltage monitor disabled 1: VDDUSB voltage monitor enabled.
pub fn set_uvmen(&mut self, val: bool)
pub fn set_uvmen(&mut self, val: bool)
None 0: VDDUSB voltage monitor disabled 1: VDDUSB voltage monitor enabled.
pub const fn io2vmen(&self) -> bool
pub const fn io2vmen(&self) -> bool
None 0: VDDIO2 voltage monitor disabled 1: VDDIO2 voltage monitor enabled.
pub fn set_io2vmen(&mut self, val: bool)
pub fn set_io2vmen(&mut self, val: bool)
None 0: VDDIO2 voltage monitor disabled 1: VDDIO2 voltage monitor enabled.
pub const fn avm1en(&self) -> bool
pub const fn avm1en(&self) -> bool
None 0: VDDA voltage monitor 1 disabled 1: VDDA voltage monitor 1 enabled.
pub fn set_avm1en(&mut self, val: bool)
pub fn set_avm1en(&mut self, val: bool)
None 0: VDDA voltage monitor 1 disabled 1: VDDA voltage monitor 1 enabled.
pub const fn avm2en(&self) -> bool
pub const fn avm2en(&self) -> bool
None 0: VDDA voltage monitor 2 disabled 1: VDDA voltage monitor 2 enabled.
pub fn set_avm2en(&mut self, val: bool)
pub fn set_avm2en(&mut self, val: bool)
None 0: VDDA voltage monitor 2 disabled 1: VDDA voltage monitor 2 enabled.
pub const fn usv(&self) -> bool
pub const fn usv(&self) -> bool
This bit is used to validate the VDDUSB supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the USB peripheral. If VDDUSB is not always present in the application, the VDDUSB voltage monitor can be used to determine whether this supply is ready or not. 0: VDDUSB not present: logical and electrical isolation is applied to ignore this supply. 1: VDDUSB valid.
pub fn set_usv(&mut self, val: bool)
pub fn set_usv(&mut self, val: bool)
This bit is used to validate the VDDUSB supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the USB peripheral. If VDDUSB is not always present in the application, the VDDUSB voltage monitor can be used to determine whether this supply is ready or not. 0: VDDUSB not present: logical and electrical isolation is applied to ignore this supply. 1: VDDUSB valid.
pub const fn io2sv(&self) -> bool
pub const fn io2sv(&self) -> bool
This bit is used to validate the VDDIO2 supply for electrical and logical isolation purpose. Setting this bit is mandatory to use PG[15:2]. If VDDIO2 is not always present in the application, the VDDIO2 voltage monitor can be used to determine whether this supply is ready or not. 0: VDDIO2 not present: logical and electrical isolation is applied to ignore this supply. 1: VDDIO2 valid.
pub fn set_io2sv(&mut self, val: bool)
pub fn set_io2sv(&mut self, val: bool)
This bit is used to validate the VDDIO2 supply for electrical and logical isolation purpose. Setting this bit is mandatory to use PG[15:2]. If VDDIO2 is not always present in the application, the VDDIO2 voltage monitor can be used to determine whether this supply is ready or not. 0: VDDIO2 not present: logical and electrical isolation is applied to ignore this supply. 1: VDDIO2 valid.
pub const fn asv(&self) -> bool
pub const fn asv(&self) -> bool
This bit is used to validate the VDDA supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the analog peripherals. If VDDA is not always present in the application, the VDDA voltage monitor can be used to determine whether this supply is ready or not. 0: VDDA not present: logical and electrical isolation is applied to ignore this supply. 1: VDDA valid.
pub fn set_asv(&mut self, val: bool)
pub fn set_asv(&mut self, val: bool)
This bit is used to validate the VDDA supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the analog peripherals. If VDDA is not always present in the application, the VDDA voltage monitor can be used to determine whether this supply is ready or not. 0: VDDA not present: logical and electrical isolation is applied to ignore this supply. 1: VDDA valid.