Skip to main content
ADesi.3
Associate II
July 9, 2023
Question

RTC not runnning on G0 Platforms

  • July 9, 2023
  • 2 replies
  • 1133 views

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

This topic has been closed for replies.

2 replies

Graduate II
July 9, 2023

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
Technical Moderator
July 11, 2023

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.