stm32f4xx-hal
stm32f4xx-hal copied to clipboard
RTC prer must be written in 2 seperate write accesses
According to manual page 804
- To generate a 1 Hz clock for the calendar counter, program first the synchronous prescaler factor in RTC_PRER register, and then program the asynchronous prescaler factor. Even if only one of the two fields needs to be changed, 2 separate write accesses must be performed to the RTC_PRER register.
src/rtc.rs:60 should break into 2 seperate write accesses