I have been making a brushless DC motor controller that is controlled through an ATSAMD21E16L and a MIC4609 mosfet driver. At low average currents of 2A or so, I drive the motor just fine, but when I give the motor a high current spike, like when trying to start it quickly to a high power, or increase the drive current from an already high current, the microcontroller will reset.
I currently have a setup where I drive the motor with 17V and a start-up duty cycle of about 33%, which causes the reset to happen reliably and instantly. I have used this reliability to probe all the pins connected to the microcontroller for anything suspicious, but everything appears normal. The reset pin has a small transient from 3.3V to 3.2V. The coil sense pins see the transients reaching no more than 1.5V. The current sense pin reaches no more than about 2V. The single-wire-debug clock and io pins also change only marginally. The PWM and enable values going to the mosfet driver also have small transients.
Basically, I can't find anything on my scope that goes at all out of spec, and yet the microcontroller resets reliably like this. I also have a separate board built up the same way with the same problem.
Since there is a fair amount of protection between the high current and voltage stuff driving the motor and the microntroller, I am starting to wonder if it is possible that EMI is somehow reaching inside the microcontroller to reset it? I really have no clue what is going on.
I tried adding a 100nF cap from RESET to GND, too, but this made no difference.
Any ideas about what may be going on or how to fix it is much appreciated!
EDIT: There is a 330uF electrolytic on +V_MOTOR (using the GND pad shown on the front render below). The motor power and ground connections are directly on the pads shown in this front render view. My hope is that the short low-impedance connections (aided by some extra copper wire on those strips) means the large motor currents have a short enough path to not effect the rest of the circuit too much.
I also don't have any interrupts enabled.
The logic power is a completely different power source than the motor voltage. The motor voltage now is from a bench power supply and the logic supply is from an Arduino.
Shorting RESET to +3.3V also did not help.
Conclusion: Changing the 4.7 ohm high side gate resistors to 100 ohm causes the resets to happen only half the time under my testing setup. So while I don't know exactly how the EMI is affecting the microcontroller, I do know that reducing the startup transients is helping.