Hello, and welcome to the forum.
I might suggest placing, say a 100 ohm resistor between each output and the MOSFET gate. Then to give additional protection from high voltage spikes finding their way back to the output pins, I would also suggest connecting a Schottky diode between each output pin and Vdd (cathode to Vdd). This would reduce any transient current that might be injected into the pin, since the Schottky diode will conduct at a lower voltage than the internal parasitic diode within the MCU. You might actually consider using 3-pin Schottky diode packages, containing two series connected diodes. The anode of the second diode would connect to ground, to additionally afford protection against negative transients.
The bulk capacitance value connected to the Vdd rail should be sufficient to absorb the transients without significant Vdd voltage increase. An additional 5.6 volt Zener diode at the Vdd rail would provide additional protection against over-voltage.
I presume that the switching process is to control the average solenoid current, by manipulating the duty cycle. The solenoid time constant is about 6 milliseconds, so continuous current would be maintained with 27 kHz switching rate (37 us period).
With direct drive from the MCU pin, the switching delay plus risetime is likely to be about 1 us. This will result in higher power dissipation within each MOSFET, compared with using higher current drive circuits, i.e. increased switching losses. You will need to determine whether this is acceptable.
Since the transient drive current associated with each circuit is likely to persist for only 1 us, the switching control of each output might be staggered by at least this amount, so that simultaneous transients do not occur for more than one output.
Regards,
Mac
Another advantage to adding series resistance and clamp diodes is the case of a FET failure. With the additional components, the micro will not get destroyed if the FET shorts.
Since your switching frequency is quite low, I suggest adding a series resistor in every output to the fets.
You could actually observe current peaks and drive them to a safe level.
And you would decrease emission as a bonus.
Although I use simulation I never trust it entirely since models sometimes are not good enough.
I hope it helps,
Celso