I'm assuming (no way to verify) that when the motor pulls too much I get voltage spikes which cuts out my microcontroller. Here's my circuit, any suggestions on how to fix this issue?
The left chip is an hbridge and the center one is a 5v regulator.