Skip to main content
Graduate II
January 22, 2024
Question

Stuck in RTC_EnterInitMode

  • January 22, 2024
  • 2 replies
  • 3345 views

After connecting to a X-NUCLEO-LPM01A board for power consumption test , RTC init will not end.

Stuck in this while loop:

 

 tickstart = HAL_GetTick();
 /* Wait till RTC is in INIT state and if Time out is reached exit */
 while ((hrtc->Instance->ISR & RTC_ISR_INITF) == 0U)
 {
 if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE)
 {
 return HAL_TIMEOUT;
 }
 }

 

 Current solution: I have to program some example using stm32wbIDE, only that fixes it and I can now use my FW.

 

 

    This topic has been closed for replies.

    2 replies

    ST Employee
    January 23, 2024

    Hello @DS.4 ,

    Make sure the RTC APB clock is enabled by checking the RTCAPBEN bit field , this could be due to some missing steps in the configuration of RTC and its clock source . This is just a guess if this does not resolve your issue i need further details on your configuration to help you solve this problem.

    BR 

    DS.4Author
    Graduate II
    January 23, 2024

    I will check that, 

    Weird thing is even after aligning my init process to that of the example, it still won't work.

    I still have to program the example and later my code.

    Visitor II
    January 1, 2025

    I am running into this same issue on an example project for the STM32WLE wireless MCU. Has a solution been found? Can I provide any information to help solve the problem?