PWM edges issue on a STM32F0 micro
That looks very much like a problem with the compensation adjustment on your probes.
Your scope should have a calibration signal output. Check that your scope shows a nice square wave when the probe is connected to the calibration output.
If the calibrstion output doesn't look nice and square with straight, vertical edges and flat, horizontal tops and bottoms, adjust the compensation screw on your probe to get the square wave square.

A digital output from a microprocessor should normally have straight edges and a flat top and bottom.  If it doesn't then you either have too much of a load on it or the scope (probes) need to be adjusted.