Skip to main content
Visitor II
February 3, 2021
Question

STM32F411CE(Black Pill) and RTC setup

  • February 3, 2021
  • 1 reply
  • 1331 views

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

 

    This topic has been closed for replies.

    1 reply

    Super User
    February 3, 2021

    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