2024-09-23 10:04 AM - edited 2024-09-23 03:00 PM
While in debug I get and error in this line of code. I do not get an error when running code not in debug.
/* Wait till HSE is ready */
while (READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT;
}
}
SBC NUCLEO-U5A5ZJ-Q
CUBEMX IDE
2024-09-23 03:12 PM
> So why does it fail only in debug but when I run not in debug.
I don't know. The important thing is to get the code correct. You should verify on your board this is actually the case.
> Where do I set the HSE to 16Mhz.
In the clock configuration tab:
2024-09-24 01:46 PM
Hello @lwatcdr
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards,
Roger
ST Support
2024-10-08 12:46 AM
I am encountering the same mentioned problem. Could you please share the solution or any guidance on how to resolve it?
2025-01-08 01:32 AM - edited 2025-01-08 02:14 AM
Facing the same problem here.
I've tried setting the input frequency to 16 as suggested, but that didn't help.
Any other solutions?
PS: I've downloaded and installed the latest versions of STM32CubeIDE and STM32CubeMX today.
Here are some detail pictures of my board. I think these are the correct default settings. (I got the board from a customer. I don't think they changed anything to the jumpers.)
2025-01-08 04:10 AM
Never mind. Found the fix.
The setting for HSE must be set to 'Crystel/Ceramic Resonator', just like with the LSE.
Now I can debug my project.