Struct stm32_hal2::rtc::RtcConfig
source · pub struct RtcConfig {
pub clock_source: RtcClockSource,
pub async_prescaler: u8,
pub sync_prescaler: u16,
pub bypass_lse_output: bool,
}
Expand description
Configuration data for the RTC.
Fields§
§clock_source: RtcClockSource
RTC clock source. Defaults to LSI (Low speed internal oscillator)
async_prescaler: u8
Asynchronous prescaler factor This is the asynchronous division factor: ck_apre frequency = RTCCLK frequency/(PREDIV_A+1) ck_apre drives the subsecond register. Defaults to 127.
sync_prescaler: u16
Synchronous prescaler factor This is the synchronous division factor: ck_spre frequency = ck_apre frequency/(PREDIV_S+1) ck_spre must be 1Hz. Defaults to 255.
bypass_lse_output: bool
Bypass LSE output - eg if you’re using a self-powered external oscillator. This saves power, and lets you use the LSE output pin as a GPIO.