rtc

rtc device reset at boot ?

Created at 2023-08-29 12:35:04

Hi,
I'm trying to use the rtc-device in stm32f411. All looks fine, but it will always reset the clock and calendar to "Sat Jan 1 00:00:08 2000" at every boot. I've even set it up in Cubemx to 2023-08-29... still resetting.
Am I missing something ?

br. Mike

更多

Follower
0
Views
289
2 Answers
linhbui
linhbui 2023-09-12

Have you enabled rtc on chip yet?

RVZK_8460
RVZK_8460 2024-02-17

Difficult to understand why problems can sometimes happen in RT-THREAD
In my compilation on any version of the O.S. using STM32F417 all went fine.

define BSP_USING_ONCHIP_RTC

define RT_USING_RTC

deleted the WEAK in source file and changed to __weak
No alarm set

At leats I have no such problem, but have others.
Any time I power the board which has a tiny onboard battery all is fine. Time is not lost but only after weeks of power down of course.

msh />cal

Time: 21:39:02
Date: Fri. 16 February 2024

M T W T F S S

           1   2   3   4

5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share