cancel
Showing results for 
Search instead for 
Did you mean: 

RTC not runnning on G0 Platforms

ADesi.3
Associate II

Hi, 

I've tried to test the RTC Peripheral on Nucleo-G071 and on Nucleo-G031 boards.

RTC seems to be stopped.

Can anyone please help in finding the bug? (I've Attached the 2 MX Projects and 2 Main.c)

Thanks,

Alfonso

2 REPLIES 2
JTP1
Lead

Hello

I believe you must call also HAL_RTC_GetDate() after calling the HAL_RTC_GetTime() to get shadow registers updated.

HAL_RTC_GetTime(&hrtc, &xTime, RTC_FORMAT_BIN);
HAL_RTC_GetDate(&hrtc, &xDate, RTC_FORMAT_BIN);
KDJEM.1
ST Employee

Hello @ADesi.3 ,

Please check the RTC Parameter Settings.

I recommend when you configured the RTC, to get inspired from an available  RTC_Calendar example from STM32CubeG0 package

This example has been tested with NUCLEO-G071RB board and can be easily tailored to any other supported device and development board.

 I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.