Skip to main content
PStee
Associate II
November 6, 2019
Question

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

  • November 6, 2019
  • 3 replies
  • 1068 views

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
November 6, 2019

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
November 6, 2019

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
November 6, 2019

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