Struct Cfgr
#[repr(transparent)]pub struct Cfgr(pub u32);
Expand description
RCC clock configuration register
Tuple Fields§
§0: u32
Implementations§
§impl Cfgr
impl Cfgr
pub const fn sw(&self) -> Sw
pub const fn sw(&self) -> Sw
system clock and trace clock switch Set and reset by software to select system clock and trace clock sources (sys_ck). Set by hardware in order to: - force the selection of the HSI or CSI (depending on STOPWUCK selection) when leaving a system Stop mode - force the selection of the HSI in case of failure of the HSE when used directly or indirectly as system clock others: reserved
pub fn set_sw(&mut self, val: Sw)
pub fn set_sw(&mut self, val: Sw)
system clock and trace clock switch Set and reset by software to select system clock and trace clock sources (sys_ck). Set by hardware in order to: - force the selection of the HSI or CSI (depending on STOPWUCK selection) when leaving a system Stop mode - force the selection of the HSI in case of failure of the HSE when used directly or indirectly as system clock others: reserved
pub const fn sws(&self) -> Sw
pub const fn sws(&self) -> Sw
system clock switch status Set and reset by hardware to indicate which clock source is used as system clock. 000: HSI used as system clock (hsi_ck) (default after reset). others: reserved
pub fn set_sws(&mut self, val: Sw)
pub fn set_sws(&mut self, val: Sw)
system clock switch status Set and reset by hardware to indicate which clock source is used as system clock. 000: HSI used as system clock (hsi_ck) (default after reset). others: reserved
pub const fn stopwuck(&self) -> Stopwuck
pub const fn stopwuck(&self) -> Stopwuck
system clock selection after a wakeup from system Stop Set and reset by software to select the system wakeup clock from system Stop. The selected clock is also used as emergency clock for the clock security system (CSS) on HSE. 0: HSI selected as wakeup clock from system Stop (default after reset) STOPWUCK must not be modified when CSS is enabled (by HSECSSON bit) and the system clock is HSE (SWS = 10) or a switch on HSE is requested (SW =10).
pub fn set_stopwuck(&mut self, val: Stopwuck)
pub fn set_stopwuck(&mut self, val: Stopwuck)
system clock selection after a wakeup from system Stop Set and reset by software to select the system wakeup clock from system Stop. The selected clock is also used as emergency clock for the clock security system (CSS) on HSE. 0: HSI selected as wakeup clock from system Stop (default after reset) STOPWUCK must not be modified when CSS is enabled (by HSECSSON bit) and the system clock is HSE (SWS = 10) or a switch on HSE is requested (SW =10).
pub const fn stopkerwuck(&self) -> Stopkerwuck
pub const fn stopkerwuck(&self) -> Stopkerwuck
kernel clock selection after a wakeup from system Stop Set and reset by software to select the kernel wakeup clock from system Stop.
pub fn set_stopkerwuck(&mut self, val: Stopkerwuck)
pub fn set_stopkerwuck(&mut self, val: Stopkerwuck)
kernel clock selection after a wakeup from system Stop Set and reset by software to select the kernel wakeup clock from system Stop.
pub const fn rtcpre(&self) -> u8
pub const fn rtcpre(&self) -> u8
HSE division factor for RTC clock Set and cleared by software to divide the HSE to generate a clock for RTC. Caution: The software must set these bits correctly to ensure that the clock supplied to the RTC is lower than 1 MHz. These bits must be configured if needed before selecting the RTC clock source. …
pub fn set_rtcpre(&mut self, val: u8)
pub fn set_rtcpre(&mut self, val: u8)
HSE division factor for RTC clock Set and cleared by software to divide the HSE to generate a clock for RTC. Caution: The software must set these bits correctly to ensure that the clock supplied to the RTC is lower than 1 MHz. These bits must be configured if needed before selecting the RTC clock source. …
pub const fn timpre(&self) -> Timpre
pub const fn timpre(&self) -> Timpre
timers clocks prescaler selection This bit is set and reset by software to control the clock frequency of all the timers connected to APB1 and APB2 domains.
pub fn set_timpre(&mut self, val: Timpre)
pub fn set_timpre(&mut self, val: Timpre)
timers clocks prescaler selection This bit is set and reset by software to control the clock frequency of all the timers connected to APB1 and APB2 domains.
pub const fn mco1pre(&self) -> u8
pub const fn mco1pre(&self) -> u8
MCO1 prescaler Set and cleared by software to configure the prescaler of the MCO1. Modification of this prescaler may generate glitches on MCO1. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs. …
pub fn set_mco1pre(&mut self, val: u8)
pub fn set_mco1pre(&mut self, val: u8)
MCO1 prescaler Set and cleared by software to configure the prescaler of the MCO1. Modification of this prescaler may generate glitches on MCO1. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs. …
pub const fn mco1(&self) -> Mco1
pub const fn mco1(&self) -> Mco1
Microcontroller clock output 1 Set and cleared by software. Clock source selection may generate glitches on MCO1. It is highly recommended to configure these bits only after reset, before enabling the external oscillators and the PLLs. others: reserved
pub fn set_mco1(&mut self, val: Mco1)
pub fn set_mco1(&mut self, val: Mco1)
Microcontroller clock output 1 Set and cleared by software. Clock source selection may generate glitches on MCO1. It is highly recommended to configure these bits only after reset, before enabling the external oscillators and the PLLs. others: reserved
pub const fn mco2pre(&self) -> u8
pub const fn mco2pre(&self) -> u8
MCO2 prescaler Set and cleared by software to configure the prescaler of the MCO2. Modification of this prescaler may generate glitches on MCO2. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs. …
pub fn set_mco2pre(&mut self, val: u8)
pub fn set_mco2pre(&mut self, val: u8)
MCO2 prescaler Set and cleared by software to configure the prescaler of the MCO2. Modification of this prescaler may generate glitches on MCO2. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs. …