How to make sure my motor will not start spinning on power up in case the throttle (POT) was not at a 0 position?
I figured out why my MCU was resetting, this was due to the hall effect sensors to the input of the MCU. When my motor hit the current limit the noise from the motor was induced in to the hall effect sensors which are configured inside the motor, which are than connected to the inputs of my Microcontroller, this was fixed with some decoupling capacitors.