Inverting output of gate driver for MOSFET
when my controller starts up, the motor is running until the code applies the max value to the PWM output to shutdown the motor.


You can use a pull-up resistor with your existing circuit to ensure the load stays off until your code reaches the point of enabling its output pin.







simulate this circuit &ndash; Schematic created using CircuitLab