2024-11-25 10:52 AM - edited 2024-11-25 04:21 PM
Hi, I have an issue with my project. It is bare metal project. When Im configuring clock the boards is failing in SystemClock_Config().
I tried to copy the setup from BSP_BasicTemplates. But the results is the same.
Here is the error I get on console.
Info : New GDB Connection: 1, Target STM32MP135FAFx.cpu, state: halted
Error: timeout waiting for DSCR bit change
Error: Error waiting for InstrCompl=1
Error: Error waiting for cortex_a_exec_opcode
Error: timeout waiting for DSCR bit change
Error: Error waiting for InstrCompl=1
Error: timeout waiting for DSCR bit change
Error: Error waiting for InstrCompl=1
Error: Error waiting for dpm prepare
Error: timeout waiting for DSCR bit change
Error: Error waiting for InstrCompl=1
Error: Error waiting for cortex_a_exec_opcode
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (4013 ms). Workaround: increase "set remotetimeout" in GDB
But when Im running the BSP_BasicTemplates example there is no issue.
2024-11-25 04:01 PM
After investigation I found out that this error comes after disabling PLL2 outputs in HAL_RCC_DeInit().
/* Disable PLL2 outputs */
CLEAR_BIT(RCC->PLL2CR, RCC_PLL2CR_DIVPEN | RCC_PLL2CR_DIVQEN |
RCC_PLL2CR_DIVREN);
But when HAL_RCC_DeInit() is not called then RCC_PLL1_Config() in HAL_RCC_OscConfig()
is failing on if (__IS_PLL1_IN_USE() == 0U). So I assume I have to call Deinit first,
as it is also called in examples.