generating 8 40KHz pulses

In an Half-bridge power stage, to prevent shoot-through during switching between the separate drive inputs for the high and low MOSFETs, you have to provide a dead time between the switching off of one MOSFET and the switching on of the other (datasheet Figure 38-7, page 982). A huge amount of shoot-through current would result in device destruction.

That’s why you can't just use a pulse-width modulation signal and its inverse (PWMH/PWML) to drive the high and low inputs, you have to generate an non-overlapping time (or dead time) between the falling edge of one input and the rising edge of the other.

Note that Figure 38-6 page 981 of Sam3x datasheet is wrong, you can find the correct one at page 962 Figure 39-6 of Sam4s datasheet.