2023-07-14 12:53 AM - edited 2023-07-14 12:54 AM
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.
2023-07-14 02:32 AM
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....
2023-07-14 04:18 AM
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 Hardfauk