cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Not Running

VijayRakeshM
Associate III

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

15 REPLIES 15

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

JW

VijayRakeshM
Associate III

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

Hummmm...

And RTC_ISR.INIT?

JW

VijayRakeshM
Associate III

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

Vijay Rakesh

VijayRakeshM
Associate III

Hi JW,

I'm awaiting for your valuable reply.

Vijay Rakesh

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

VijayRakeshM
Associate III

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

Vijay Rakesh

VijayRakeshM
Associate III

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.

celilertop
Associate

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.