Skip to main content
PStee
Associate II
Nov 6, 2019 3:19 PM UTC
Question

How to I update a running RTC time and date on stm32L4

I understand that the registers are write protected and you have a clock synchronization issue, but I can not find the cube HAL level calls to do this.

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
Nov 6, 2019 4:42 PM UTC

What's the point of using Cube, if it's harder than reading the manual and writing a couple of assignments into registers?

Try to look at the examples in Cube.

JW

PStee
PSteeAuthor
Associate II
Nov 6, 2019 5:03 PM UTC

I am using the HAL_RTC_SetTime(&hrtc, &stimestructureput, RTC_FORMAT_BIN); which says it is doing these steps but it is failing to get the RTC back in init mode so the value can be changed.

PStee
PSteeAuthor
Associate II
Nov 6, 2019 5:33 PM UTC

The ever so intuitive answer was to change StoreOperation from SET to RESET now it works