PWM2 is a PWM mode that applies to an STM32 timer.
In up-counting, channel 1 is inactive as long as TIMx_CNT is less than TIMx_CCR1; otherwise it is active.
In down-counting, channel 1 is active as long as TIMx_CNT is greater than TIMx_CCR1; otherwise it is inactive.