This is the schematic in its basic form. It's an nMOSFET that gets driven by a pin of an Atmega328p, this nMOSFET on his turn, drives a big pMOSFET. The source is connected to a voltage regulator (9V6), the drain is connected to the backlight of an RGB screen. The Atmega generates a PWM-signal (100kHz, duty-cycle is variable) so one can change the brightness of the screen.
However, when looking at the drain, I noticed that the OFF-part doens't go to ground and there's lots of ringing.
The ringing I could damp by adding a snubber network to the drain of the pMOSFET. But the OFF-part still doesn't go to ground and there is still a sudden peak in voltage that I could not remove. It seems something is pulling the voltage back high.
How comes that there is still a DC component in the OFF-part of the PWM?
How can I remove that part so it goes to ground?
The only other question I found, is this one: High side mosfet source voltage does not switch back to ground
So I added a parallel RC network at the output.
Measuring now, it goes down to ground, but there is still a peak present in the signal.
Can I clean this up further?