Skip to main content
Explorer
October 1, 2024
Solved

STM32H723 Hanging on 'wait till LSE is ready' when using LSI

  • October 1, 2024
  • 1 reply
  • 1761 views

Hi,

 

I have an STM32H723ZGT which I am having problems with hanging at boot.

When debugging, it is stuck at 

 /* Wait till LSE is ready */
 while(LL_RCC_LSE_IsReady() != 1)
 {

 }
in main.c
 
I currently have LSE disabled and RTC clock set to LSI, but I still cannot boot past this point.
 
I have VBAT to a coin cell, which is not inserted and have tried power cycles and also extended waiting with power removed.

There was a 32.768kHz crystal on the board, but I have decided not to use this, and tried disabling, and now removing it from the board too.
I also tried LSE in bypass mode with 32.768kHz signal from a generator, but it seems to hang at the same place.


When I first programmed the device, with a release build using LSI, this worked and the processor booted to the user application, and this worked through several power cycles, but once I try to debug it locks at the same point and I can't do anything to recover it.
this is now 2x PCBs that have same behaviour.
    This topic has been closed for replies.
    Best answer by TDK

    Why is your code waiting for LSE if it's disabled?

    If this is unmodified from an IOC file, please include that IOC file. Otherwise include your main.c file or relevant code. It sounds like when you switched from LSE to LSI you didn't take out some parts of the code that should have been taken out.

    1 reply

    TDKAnswer
    Super User
    October 1, 2024

    Why is your code waiting for LSE if it's disabled?

    If this is unmodified from an IOC file, please include that IOC file. Otherwise include your main.c file or relevant code. It sounds like when you switched from LSE to LSI you didn't take out some parts of the code that should have been taken out.

    deanCIAuthor
    Explorer
    October 1, 2024

    That is a good point. 
    I thought the clock config function

     /* Configure the system clock */
     SystemClock_Config();

    had been auto generated by the clock config tool in the IOC viewer.

    Removing all references to LSE in this function seems to fix the issue at this stage.

     

     

    Super User
    October 1, 2024

    @deanCI wrote:

    I thought the clock config function ... had been auto generated by the clock config tool in the IOC viewer.


    Yes, it should be.