driving motor DC 24V with MOSFET
Haha! 

Nice, glad it help. So let's summarize. 


The PWM frequency should be calculated according to motor time constant (L/R). You didn't measure ohmic resistance, so my educated guess is that it's around 5 ohms. 


Wht happens when PWM frequency is low? Motor current reaches very high value despite your duty cycle.

I would argue that 32khz is a little high- high end servo work with such frequency. But it's definitely better than 0.5khz.

Now, i still hate your serial gate resistor. Why? Because it makes rise time of your MOSFET longer. During that time the voltage across transistor is not zero (average of half VBUS) and current is full, so power is quite high.