How to implement a motor brake
Your circuit is on the right track. Applying a resistor in parallel with the motor will work. The voltage produced by the motor depends on the direction it spins. It won't reverse just because you stop applying power.

The motor will keep the switch node at a voltage between the supply voltage and ground. At this point, shorting the motor or applying a resistor across its terminals will allow it to drive current opposite the direction it normally flows dissipating energy into the resistor and/or its own internal resistance.

Using an N-channel MOSFET is problematic. It should be either on (Vgate=10V) or off (Vgate=0 volts) as you have it now, the circuit applies whatever voltage is across the motor to the gate. As the motor slows down, this voltage will decrease and the MOSFET will eventually enter it's linear region. At that point, it will dissipate more and more of the braking power and will POP. You need some way of supplying a voltage higher than the supply voltage to keep the MOSFET fully turned on. This can be done with a bootstrap circuit possibly with a charge pump depending on how exactly the brake will be used. The alternative would be to use a P-channel MOSFET on the high side to switch the braking resistor into the circuit. This simplifies gate drive.

Of note, the triangle wave generator in the controller generates a square wave internally that could be used to drive a charge pump.

Here's what a charge pump based solution would look like:


Note: the Zener diode should be 10-12 volts. It limits the voltage produced by the charge pump. The capacitor should be large enough to supply the current required by the turn off resistor while keeping the gate drive voltage at a reasonable level.

Here's what doing the same thing with an P-channel Mosfet would look like. Notice how much simpler the gate drive is. The resistor ratio determines the voltage ratio between the signal and the gate drive voltage.:



P-Channel MOSFETs may be a little more expensive than equivalent N-channel MOSFETs but not that much more. It's worth considering them for this application.

Here's how to do it with a relay: