Skip to main content
Associate II
Feb 23, 2024 6:19 AM UTC
Question

RTC example folder Freezes at HAL_RTC_Init

I tried the RTC_Alarm example folder, at first it worked out well and I was able to view the output.

But when I ran for the 2nd time without any changes in the code the execution stopped at 

 HAL_RTC_Init ->> (if (HAL_RTC_Init (& RtcHandle)! = HAL_OK)).  And it didn't get through the if loop also.

And strangely when I upload some other code and reset the board (STM32WL55 Nucleo board) and again when I upload the RTC_Alarm code it works fine and again when I upload the same code the 2nd time the code is freezing.

What should I do and where I am going wrong here..

This topic has been closed for replies.

3 replies

STTwo-32
ST Technical Moderator
Feb 23, 2024 8:00 AM UTC

Hello @Subha_shree_bask 

I've tested personally (with different boards) but I can't find any issue. Could you send some data about the issue ( screenshots,...). 

Best Regards.

STTwo-32

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 II
Feb 23, 2024 9:06 AM UTC

Subha_shree_bask_0-1708678883185.png

 (if (HAL_RTC_Init (& RtcHandle)! = HAL_OK)). it freezes here and the aShowTime values are just at "hh:ms:ss"

 

I just added BSP_Led_On(LED3) to the RTC Callback Alarm function. that's it even if remove that extra line the same happens.

 

 

STTwo-32
ST Technical Moderator
Feb 24, 2024 10:28 AM UTC

Hello @Subha_shree_bask 

For RTC use cases, this behavior is normal when debbuging since RTC clock configurations are modified what could generate different issues on the RTC.

Best Regards.

STTwo-32 

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.