cancel
Showing results for 
Search instead for 
Did you mean: 

Hard Fault issue in 2 particular MCU

imran.aftab
Associate III

We are using STM32G0B1CBT MCU in our product. We assembled 10 pieces and out of 10, 2 devices are randomly going in hard fault sometime instantly after reset and sometime even after 1 hour.

What would be the cause? What measures should be taken to resolve it?

2 REPLIES 2

>>What would be the cause? 

Accesses to undefined addresses, via pointers, etc.

Misaligned data accesses, unaligned structures, or pointers

>>What measures should be taken to resolve it?

Have a Hard Fault Handler that outputs actionable diagnostic information that the CPU provides.

Look at the faulting code, and registers.

Entirely random, look at what interrupts are doing, if stack is adequate, or buffers are corrupted.

Perhaps look at flash wait states, powering issues.

DEBUG THE PROBLEM

ARM has Technical Reference Manuals for the core, ST has "Programming Manuals" covering similar material. Joseph Yiu has several books from an alternative perspective.

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

Only 2 boards out of 10 with this problem, it sounds like a hardware problem.

Check the soldering, the quality of the power supplies (voltage, noise, decoupling).