cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071RB RTC init bug.

wuio
Associate II

Please, answer was anyone trying to use RTC with the G071RB microcontroller? I am powerless now. The code generated by cube does not initialize RTC. I checked the entire initialization procedure if it is consistent with the documentation. Everything is correct and does not seem to be a mistake in HAL. The problem for me in the RTC_EnterInitMode function is the line SET_BIT (hrtc-> Instance-> ICSR, RTC_ICSR_INIT) ;. The INIT bit and the INITF flag are not set so that RTC does not enter the initialization mode. I am asking for an answer because the problem is not in my code only in the code generated by the cube. Is RTC initializing for you or is the problem in my microcontroller? I will add that there is no difference which source of RTC clock will be chosen.

12 REPLIES 12

Hi Jan,
Thank you, I just bookmarked your link.

Have a nice day,
Kraal

Dear @Imen.D ,

Can we please get an update of RM0444 and RM0454 that includes the RTC APB bit ? the last update of these reference manual was made in 2020.

Thank you.

Imen.D
ST Employee

Hi @Kraal ,

Thank you for pointing this missing.

I submitted an internal ticket in order to fix this in the coming release (Internal ticket number: 185916)

(PS: Internal ticket number: 185916 is an internal tracking number and is not accessible outside of ST)

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen