Ringing at GPIO and MOSFET

I hope there is a real professional in electronics in the community.
The picture below shows the signal of PWM output of STM32 in red and the signal after MOSFET of a DRV8302 driver board.
Massive ringing on both lines. This is captured at 6V rising. At my usual 20V I see -16V peak-output of the driver on each phase.
I can’t believe that this wave-form-fit is random.

I’m aware that the Drain-to-Source-voltage of a half-bridge tends to ring. Usually the inductivity of the motor is smoothing the current.
Because I’m working with a motor typ that has nearly no inductivity I was faced with the problem that I loose 50% of efficiency with this ringing. If I add a 3A toroidal inductor to each phase the current consumption for an equal load drop by 50%. But this double the size and weight of the ESC, adding additional resistance and limits the current to the max of the inductor.

The question is: is it possible to influence the ringing of the half-bridge by flattening the PWM Input. How to do? Or is it just the feedback of the MOSFET that I can see on the GPIO output.

Additional question: Is there another way to smooth the current of a driver even if I have no inductive load.

Thanks in advance for any hint.

Too bad no responses on this, I would have liked to learn the answer. Did you find a solution?

I wonder where the problem lies? Is it a grounding thing, since both are ringing - maybe solved with more capacitance to support the transitions?

Hi @runger,
With a lot of inductance the effect disappears after the coils. Never tried to use capacities. The driverboard died short after the first test. I switched to an Infineon board and had no such ringing.

But within the next days I will setup a new combination of bluepill and 8302. Then I will evaluate this again.