cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 - HardFault on Voltage Drop

ToBi
Associate

Hi!

I currently am trying to investigate random hardfault errors if i connect some addon board to my current project. What is happening is: On connection, VCC drops to 1,8V minimum, while being under 2,5V for ~ 2us. The result of this is either a reset behaviour or worse problem: a random hard fault. Often, the last PC is set to some random address which is no flash memory, causing IBUSERR or UNDEFINSTR. How can this happen? Documentation says, BOR/POR is always on, so in my understanding there should be no possibility for undefined MCU states.

Any suggestions?

Regards,

Tobias

2 REPLIES 2

What are the thresholds for BOR/POR ?

Low voltages might impact flash speed and prefetch. Does pushing flash wait states reduce the problem? Not clear it is undefined MCU states, but rather the MCU being fed data that isn't code, or cause a branch/vector into the unknown.

What about LR and the other registers?

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

Standard BOR_LEV is 1,7V. Setting it to 2,8 V and clearing nRST_STOP, STDBY, SHDW seems to be reducing hardfaults (instead the MCU resets "clean"), but they are are still happening. As mentioned, every fault is different. For example:

precise data access violation

sp 0x20007f38

r0 0x4

r1 0x44

r2 0xf205fa00

r3 0x0

r12 0x3

lr 0x80112c9

pc 0x8000442

xpsr 0x41009800

OR:

sp 0x0

r0 0x20008000

r1 0x8002655

r2 0x800249d

r3 800249f

r12 0x80024af

lr 0x80024bf

pc 0x80024cf

xpsr 0x0