User Activity

Hello, I work on STM32F407.I want to start the PWM 1 on the rising edge of the main PWM and start the PWM 2 on the failling edge of the main PWM. But I don't know how I can detect the rising/failling edge...Can you help me please ? Thanks a lot.