2025-04-22 8:56 AM
hi, im using stm32g474vet6 mcu for power converter. when the supply is turned on initially first time, controller is behaving like hang or stuck somewhere. if i do a pushbutton reset, the mcu starts working fine. after that no issue. whenever im turning off and on the power supply, that time controller is not responding or hanging.
what to do for this. since nrst pin not pulled down or pull up. only boot pin is pulled down with 10kohms.
i think in debugging mode, controller will alive only, this problem will not come. initially some code issue or init issue or configuration issue if there also, but after the reset mcu starts working finely.
so what happens with the initial supply on time. since i have changed power supplies also. after changing the power supply, if i turn off and on(POR) , during that time also hanging is happening.
whenever main supply turn off and on this probelm is coming one time, after push button reset only mcu starts working fine.
can anyone suggest what to do
2025-04-22 9:21 AM
Check your design against "AN5093 Application note Getting started with STM32G4 Series hardware development boards".
NRST is a bidirectional pin, you may monitor the internal POR and VSS with a scope.
I assumed the chip is already programmed. Otherwise, the empty flash check will kick in.
Check MCU settings (like option bits) for accidental system memory boot (see AN2606 Application note STM32 microcontroller system memory boot mode).
Start with the simplest possible bring-up firmware just switching a LED on or such.
hth
KnarfB
2025-04-22 9:51 AM
So probably is running, and just crashes.
Have some signs-of-lift early in the Reset Handler code, and have it output some info if it ends up in Error_Handler() or HardFault_Handler() rather than die silently in a while(1) loop.
If you are starting an HSE (External Oscillator) or PLL, make sure that's not timing out or failing with the initial start.