HAL_GetTick() freezes MCU ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 4:14 AM
Hello Community,
i have an empty project with STM32L051R8 MCU.
Project was created with
CubeIDE Version: 1.8.0
Build: 11526_20211125_0815
Only the OscillatorPins for external 8MHz crystal, RCC_MCO and SWDIO+SWCLK have been configured.
HSE is used for PLL Source and PLLCLK for SYSCLK.
Now i see that in function HAL_RCC_ClockConfig(...)
in functionality:
else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
{
while (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_SYSCLKSOURCE_STATUS_PLLCLK)
{
if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
{
return HAL_TIMEOUT;
}
}
}
The MCY calls signal Handler 0xffffffff9
and 0xffffff1
Are there any information how to get the programm running?
Many thanks in advance
BR's
martin
- Labels:
-
STM32CubeIDE
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 6:11 AM
Hello,
It seems like you can't switch to the PLL as system clock source, for some reason.
Most of the time it is because of improper PLL parameters or because the oscillator driving the external XTAL (HSE) can't start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 6:14 AM
Freezes the MCU, or gets stuck in the HardFault_Handler, or some other IRQ Handler, or SysTick, etc.
When you stop in the debugger, where is it?
Does it get stuck in the loop because the tick doesn't advance?
HSE starts and clocks?
Flash wait states consistent with the speed you're attempting to clock the MCU when it switches to the PLL speed?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 6:28 AM
External XTAL works as expected. and configuration is as in the picture shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 6:36 AM
I will check Flash wait states...
HSE starts and SysTickTimer is counting. it seems no SysTickInterrupt is thrown?
see picture below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 8:13 AM
OK Finally failure found.
reason was a floating level @boot0-Pin
many thanks for the help
BR's
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-25 8:17 AM
So mapping of zero address space, and vector table.
Would explain the 0x1FFFxxxx address in the stack-dump
Up vote any posts that you find helpful, it shows what's working..
