2021-02-03 10:04 AM
Hello, I am using STM32F411CE(Black Pill) + STD periph+TrueStudio. Within my project, I am using RTC with LSE. Configuration of RTC incl. Time/ Date setup is running smoosly. The problem occurs when I want to change the RTC settings after introduction config and setup, I cannot change the RTC registers using the SetTime and SetDate functions and the RTC runs in original Time/Date setting without change. For both functions (SetTime and SetDate) the return value is ERROR. Is there some example of running code where RTC changing on the fly is running? Thank you. Tomas
2021-02-03 12:42 PM
I don't use SPL, but the procedure is outlined in quite some detail in RTC initialization and configuration subchapter in RM.
Don't forget to enable PWR in RCC before accessing PWR_CR.
JW