Hello, I am trying to make a simple inverter pcb but my output is a square wave instead of the expected spwm. I suspect that some capacitance or inductance is built up due to the pcb layers that alters the gate signal. My traces going to the mosfet gates are quite wide (1.5mm) and their length is approximately 25mm.
Picture 1 is the output of an earlier version of the board. This is close(r) to the expected result.

Picture 2 is my newest version of the board.

Note that I went from a 2 layer pcb to a 4 layer pcb and the traces from the microcontroller to the mosfets are in the inner layers. Also, the earlier board had thinner traces to the mosfets' gates.
Any advice is appreciated. Thanks.
Picture 1 is the output of an earlier version of the board. This is close(r) to the expected result.

Picture 2 is my newest version of the board.

Note that I went from a 2 layer pcb to a 4 layer pcb and the traces from the microcontroller to the mosfets are in the inner layers. Also, the earlier board had thinner traces to the mosfets' gates.
Any advice is appreciated. Thanks.

