cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F722 random initialization problem

zexx86
Associate II

Hello,

I am having troubles with a random chip lockup. In maybe 1 from 50 tries the chip loads few lines of code and then it will stop.

I dont know what could be wrong, because my app has just few lines of code that turns LED on only. No Cache is used.

The problem is caused very likely by a powering connector. During connecting it is loosing power for a few nano or miliseconds. So the MCU is booting, but it will end up in the middle and boot again. Sometimes for several times.

If the problem occur, it is enough to repower.

MCU will not forget everything during fast repowering, it end up in unknown condition - it has not reseted completely. So it will end in uncertain condition. Since even a single line of code might eventually not be executed correctly, I am unsure how to resolve it.

I can be only sure that for the first time, it will boot up. So enabling some watchdog could maybe help.

I tried changing latency only - without help. Interestingly, with STM32F1 and F4 with a same power circuit this issue never happened. I designed own board according datasheet.

I fear the issue is related to a capacitors. But I found F7 to be much more complex than F4. Or at least it is much more prone for code errors. So it can end up stucked somewhere, yet hard fault is not working yet.

Can you point me in some direction, what to try?

4 REPLIES 4

Make sure BOOT0 is pulled Low.

Add code in Error​_Handler() and HardFault_Handler() to drive a GPIO or output diagnostic information if it gets stuck in those loops.

Try just running from the HSI clock.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Principal III

You can adjust the brown-out reset voltage in the option bytes.

TDK
Guru

I would fix the power rail issue.

You could also attach a debugger to a chip in the hung state and figure out where it is. Probably it is executing code somewhere, possibly stuck in an infinite loop due to HSE not initializing or similar.

If you feel a post has answered your question, please click "Accept as Solution".
zexx86
Associate II

I tried to run from HSI and it does not helped.

But it seems that somehow the power rail is not sufficient although powered from 150mA LDO with bypass cap and 100uF tantal at output. Average current is 50mA.

But now I found thanks to PVD that when flashing data to memory PVD is triggering voltage drop - level 7, so it drops under 2.9V which is interesting.

I will try to implement reset with NVIC during powerup. Because later I really dont want that MCU will reset at any circumstance when operating.