cancel
Showing results for 
Search instead for 
Did you mean: 

RTC not working after Cube IDE update 1.17

Tine1994
Associate II

Hello,

My STM32L476RG Nucleo board does not read out the RTC time after i updated cube IDE to 1.17

When calling "HAL_RTC_GetTime" the subtask in "stm32l4xx_hal_rtc.c" sTime->Hours = (uint8_t)((tmpreg & RTC_TR_HT|RTC_TR_HU))>>RTC_TR_HU_Pos); the current time is NOT written into the sTime.Hours or Minutes. The MCU stucks with the current value that it got during a reset. Interestingly when doing a reset the value changes to the real internal time that ran when the supply is not removed.

 

When i go to "Debug" i can read out the MCU registers TR,HU,.... and when i am watching into that registers, the MCU works normally and writes the sTime.Minutes and Hours correctly.

 

Does anybody know why the MCU does not get the Time data, only when reseting or "debugging the registers"?

5 REPLIES 5

@Tine1994 wrote:

after i updated cube IDE to 1.17


What version were you using previously?

Tine1994
Associate II

It was 1.13, but i did a new project with 1.17 to check that it is not a problem from the previous written project.

So does the new project, written from scratch in v1.17, work?

And the project "inherited" from v1.13 doesn't?

Tine1994
Associate II

Both projects are not working. Also if i do a new from scratch in 1.17. Is there a problem with the libraries maybe during the update?

Tine1994
Associate II

I did now a complete reinstallation of Cube IDE with 1.17 and made a new project with the copied main.c to test the RTC. It has still the same problem. The MCU does not refresh the sTime variables when running.

 

What is the difference when i am opening the SFRs in Debug mode and read out the RTC registers compared to when i am not touching the SFRs in Debug mode?

 

When clicking on the RTC registers, it works fine. When kept close it doesn´t.