2025-07-11 4:30 AM
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?
2025-07-11 6:42 AM - edited 2025-07-11 6:43 AM
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.
2025-07-25 8:21 AM
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.
2025-07-28 5:56 AM
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.
2025-07-29 7:58 AM - edited 2025-07-30 1:39 AM
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();
}