Skip to main content
Associate III
July 11, 2025
Solved

RTC system doesn't work with LSI clock source

  • July 11, 2025
  • 4 replies
  • 417 views

When "Activating clock source" is ticked in RTC module, my MCU doesn't start up if I reset it from RST button. But as soon as I switch the RCC clock source to LSE external 32.768khz crystal and change RTC Clock Mux to LSE, it works without a hitch. Is this by design or there may be a bug?

Best answer by KDJEM.1

Hello @george-metasphere ;

 

The issue is fixed in STM32CubeMX 6.16.0 version.

 

Thank you.

Kaouthar

4 replies

KDJEM.1
Technical Moderator
July 11, 2025

Hello @george-metasphere ;

 

Could you please give more details about your configuration and project?

Are you testing a STM32CubeU3 firmware example? 

I tested the RTC_ALARM example in the STM32CubeU3 firmware. In this example the RTC work with LSI.

After I click on RESET button, I can see that LD2 is turned ON. So, the RTC Alarm is generated correctly.

 

Thank 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.
Associate III
July 25, 2025

OK, i found the problem. Apparently this has to be launched early on in the init phase for the system to work properly with reset:

HAL_PWR_EnableBkUpAccess();

There should be a disclaimer or CubeMX should automatically add this in.

Associate III
July 29, 2025

Also, the following needs to be added at the RTC_Init phase:

 /* Enable Wakeup Pin */
 HAL_PWR_EnableWakeUpLine(PWR_WAKEUP_LINE7,PWR_WAKEUP_SELECT_3,PWR_WAKEUP_POLARITY_HIGH);

 /* Set Calendar Ultra-Low power mode */
 if (HAL_RTCEx_SetLowPowerCalib(&hrtc, RTC_LPCAL_SET) != HAL_OK)
 {
 Error_Handler();
 }

 

KDJEM.1
Technical Moderator
July 28, 2025

Hello @george-metasphere ,

 

Thank you for bringing this issue to our attention. I reported it internally for checking.

 

Internal ticket number: 214838 (This is an internal tracking number and is not accessible or usable by customers).

 

Thank 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.
KDJEM.1
KDJEM.1Best answer
Technical Moderator
November 28, 2025

Hello @george-metasphere ;

 

The issue is fixed in STM32CubeMX 6.16.0 version.

 

Thank 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.