2022-02-25 04: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
2022-02-25 06: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.
2022-02-25 06: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?
2022-02-25 06:28 AM
External XTAL works as expected. and configuration is as in the picture shown.
2022-02-25 06:36 AM
I will check Flash wait states...
HSE starts and SysTickTimer is counting. it seems no SysTickInterrupt is thrown?
see picture below
2022-02-25 08:13 AM
OK Finally failure found.
reason was a floating level @boot0-Pin
many thanks for the help
BR's
Martin
2022-02-25 08:17 AM
So mapping of zero address space, and vector table.
Would explain the 0x1FFFxxxx address in the stack-dump