cancel
Showing results for 
Search instead for 
Did you mean: 

RTC example folder Freezes at HAL_RTC_Init

Subha_shree_bask
Associate II

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

3 REPLIES 3
STTwo-32
ST Employee

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.

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.

 

 

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.