STM32H723 Hanging on 'wait till LSE is ready' when using LSI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:12 AM
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)
{
}
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.
Solved! Go to Solution.
- Labels:
-
STM32H7 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:17 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:17 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:34 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:38 AM
@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.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:40 AM
Are you implying it doesn't get auto generated in some instances?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 6:53 AM
After changing the IOC, you have to tell it to re-generate - that's how the IOC changes get fed into the C code.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 7:14 AM
I have been generating the code from the IOC, and also tried cleaning the project before but the references to LSE were still in that function. As if generating code from the IOC hadn't modified the function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-01 7:42 AM - edited ‎2024-10-01 7:42 AM
If you include your IOC we can check it out. Otherwise it's hard to verify and debug.
Most likely situation is the code hasn't been regenerated and recompiled.
