cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411CE(Black Pill) and RTC setup

TRysa.1
Associate

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

 

1 REPLY 1

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