Hi MW,
i'm not sure what you mean by a shaping resistor. Is that the R2 resistor? for rounding off the square input?
The gate resistor performs a number of functions but, in essence what you say is correct. The gate resistor should be physically as close to the gate terminal of the MOSFET as possible, ideally connected directly to the gate terminal of the MOSFET.
On a separate subject, the PMOSFET gate drive. As has been said, a driver chip is really the only way to go at the frequency and current in your circuit but, at the moment, going by your schematic of post #14, you are driving the gate of the PMOSFET from a 3.3V MCU.
Can I suggest that, until you have time to get a dedicated driver chip, you make a driver with a high conductivity NBJT; a BC337 would be ideal.
(1) Connect the emitter of the NBJT to 0V
(2) Connect a 220 Ohm resistor from the collector of the NBJT to 5V
(3) Connect a 330 Ohm resistor to the base of the NBJT
(4) Connect the NBJT collector to the PMOSFET gate shaping resistor
(5) Connect the free end of the 330 Ohm resistor to your MCU output pin.
Of course, you can flip the home made driver and use a PBJT (BC327).
The edge when the home made driver BJT is conducting will be the faster and this may affect your choice of driver sex.
Note though, that the home made driver will invert the phase of the driving waveform.
Also, on your schematic of post#14, can I suggest that you make the 15 Ohm resistor 4.7K and the 10uF capacitor a 100nF disk ceramic capacitor. That will protect the current sense input to the MCU better and also improve filtering.
spec