Use the 12V and a push/pull totem pole BJT circuit to make a 12V 'voltage' interface to the gate of the N channel MOSFET you have there. Then you can drive it hard and fast (30kHz is pretty fast, you need high current to switch the FET on efficiently) with as much of the 12V as possible. Your microcontroller will benefit from even more abstraction away from the inductive load, and you can source hundreds of milliamps rather than the limit of a little 3V low power PWM output of the STM32F4.
Page 12, in Figure 10 of this App note by Texas Instruments shows the totem pole driver circuit to drive a MOSFET.
This will fix your gate drive voltage issue, and give you awesome benefits of faster, more efficient switching, more isolation of the sensitive microcontroller from the inductive feedback of the motor, and it's a great lesson in utilising a voltage interface to drive FETs which may not have nice and low voltage gates, allowing you to use almost any standard FET, even the ones with 10V Vgs-thresholds.