STM32G47x hangs up after cold reset
Posted: Wed Sep 16, 2020 2:37 pm
Hi.
After last update of the ChbiOS the STM32G474 start to hangs up after cold start. If I press reset - the CPU restarted and worked well. On the previous commit it works fine in any case.
After some experiments I was found that the problem is with RTC and LSE, because If I set the option HAL_USE_RTC to FALSE - all works, or if I set the option STM32_RTCSEL to STM32_RTCSEL_LSI - it is also works.
I was sow that the function stm32_clock_init() was changed. Now LSE inited first, in previous commit it inited just before PLL init. I tried move this init just before PLL init and the problem dissapears. Also it seems that the hang is in function rtc_enter_init() in file hal_rtc_lld.c
After last update of the ChbiOS the STM32G474 start to hangs up after cold start. If I press reset - the CPU restarted and worked well. On the previous commit it works fine in any case.
After some experiments I was found that the problem is with RTC and LSE, because If I set the option HAL_USE_RTC to FALSE - all works, or if I set the option STM32_RTCSEL to STM32_RTCSEL_LSI - it is also works.
I was sow that the function stm32_clock_init() was changed. Now LSE inited first, in previous commit it inited just before PLL init. I tried move this init just before PLL init and the problem dissapears. Also it seems that the hang is in function rtc_enter_init() in file hal_rtc_lld.c