Skip to main content
Vinay1
Associate III
March 4, 2022
Solved

while reading the rtc not providing proper date after the RTC date & time set. how to fix it?

in stm32f407vgt,

i declared the RTC structures and set the RTC with date: 1,1,70 and time: 0:0:0

later i set RTC with new values (date: 4,3,22 and time: 10:55:28)

after few minutes if i read the RTC it giving a time properly but date is wrong (i,e. 1,1,70)

how to fix this issue?

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
March 4, 2022

You have to read date *after* time.

JW

3 replies

TDK
March 4, 2022

Show the code you're using, gotta be a bug somewhere. Verify after setting new values that they have taken effect.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
waclawek.janBest answer
Super User
March 4, 2022

You have to read date *after* time.

JW

Vinay1
Vinay1Author
Associate III
March 7, 2022

thank you this is working