How can I generate 4 of square waves with different phase using Mbed 0S

Hello

I’am trying to control stepping motor using 4 of PWM pins (NOT GPIO PINS) on nucleo L432KC board.
Each PWM outputs should have different phase but same period and duty cycles.

I can’t find function providing phase-shifting in Mbed OS.
Is there any way to generate 4 of square waves with different phase?

the easiest way is to use stepper driver ICs, for a NEMA17 size motor e.g. you can use a pololu style driver. There are plenty modules available as a standard in 3D printers.
Using PWM for a stepper motor is not usefull.