cancel
Showing results for 
Search instead for 
Did you mean: 

Hardfault problem

TB5BYO
Associate II

hi guys, have a good day,  i have a problem.

i use stm32f303ret6 microcontroller
microcontroller crashes to hardfault.As soon as the motor I control with a mosfet draws 3 amps of current, the microcontroller falls into a hard fault. It works when you disable the microcontroller and connect the nucleo 64 board with the cables outside, but it does not work when you solder the microcontroller. Do the paths passing under the microcontroller (bottom layer) make the microcontroller error? software and schematic 100% working. I drew the pcb I drew before by shrinking it again and I started to encounter this error.PCB1.pngPCB2.pngPCB3.png

2 REPLIES 2
AScha.3
Chief II

you "found" the standard problem, when any fast switching high currents close to a cpu is starting... 🙂

so you have:

a: spikes or dips in cpu supply or sensitive pins (clk i/o , reset, nmi etc.) from power switching

b: voltage spike coming to some cpu pins

c: induced current from close tracks with strong switched current creates spikes at cpu pins

which one of these you create, you can only find out yourself with your board and setup .

maybe you have to do a new board with better ground plane around cpu - not unusual....

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

I cut all the pins in and out of the microcontroller (except the power line, crystal, reset and boot pins) and I only pulled the cable for the mosfet drive and the i2c line. Still falling in HardfaukIMG_20230714_141435.jpg

IMG_20230714_141446.jpg