Skip to main content
Visitor II
January 22, 2019
Question

RTC Not Running

  • January 22, 2019
  • 15 replies
  • 8960 views

Hi, I had configured the clock to LSI RC 37KHz using cubemx with AsynchPrediv is 124 and synchPredivdivider is 295 after the RTC initialisation i'm trying to read the time using HAL_RTC_GetTime() but i'm getting the values what i initialised but doesn't increment. can anyone suggest how to solve above issue.

Thanks & Regards,

Vijay Rakesh

    This topic has been closed for replies.

    15 replies

    Super User
    January 22, 2019

    Read out RCC registers and check if LSION=1 in RCC_CSR and if LSI is selected in RCC_BDCR.RTCSEL.

    JW

    Visitor II
    January 23, 2019

    I had read out the registers LSION=1, RTCEN=1, RTCSEL=0x02 and LSIRDY=1

    Super User
    January 23, 2019

    Hummmm...

    And RTC_ISR.INIT?

    JW

    Visitor II
    January 23, 2019

    RTC_ISR.INIT was cleared i.e., RTC_ISR.INIT=0

    Vijay Rakesh

    Visitor II
    January 24, 2019

    Hi JW,

    I'm awaiting for your valuable reply.

    Vijay Rakesh

    Super User
    January 24, 2019

    I have no more ideas.

    You may perhaps look at some of the examples in Cube, run it on a "known good" board (such as Nucleo or Disco), and compare your code with the example and the registers in both cases.

    JW

    Visitor II
    January 25, 2019

    OK, I will try another examples and actually i was running the code on Disco board.

    Vijay Rakesh

    Visitor II
    January 30, 2019

    Hi,

    Now RTC is running on LSI Clock and i'm transmitting data via UART2 but the RTC is not displaying updated values but while on reset it is showing updated values as shown in below image.

    0690X000006DFmvQAG.jpg

    Thanks & Regards,

    Vijay Rakesh.

    Visitor II
    June 19, 2020

    I have completely same problem with F745 both with internal and external crystal. In addition only SubSecond increase correctly.

    Edit: Solve it. just read time AFTER "reading date". you can't read only time, interesting. Maybe someone explain this why.

    Super User
    June 19, 2020

    Read the RTC chapter in RM.

    You can also set the BYPSHAD bit.

    JW