STM32G47x hangs up after cold reset Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
alexblack
Posts: 277
Joined: Mon Sep 24, 2012 3:52 pm
Been thanked: 33 times

STM32G47x hangs up after cold reset

Post by alexblack »

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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32G47x hangs up after cold reset

Post by Giovanni »

HI,

I will look into it, the clock initialization has been reworked but I have not tried yet all the options. Moving in bug reports.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32G47x hangs up after cold reset

Post by Giovanni »

Hi,

The problem was that the BD was reset after LSE initialization so LSE was turned off again before RTC initialization, fixed in repository.

Thanks for finding.

Giovanni
Post Reply