What does TIM_OCMode do on STM32F4?
Quotes from the reference manual:

PWM mode 1
In upcounting, channel is active as long as TIMx_CNT &lt; TIMx_CCR1 else inactive.
In downcounting, channel is inactive as long as TIMx_CNT > TIMx_CCR1 else active.

PWM mode 2
In upcounting, channel is inactive as long as TIMx_CNT &lt; TIMx_CCR1 else active.
In downcounting, channel is active as long as TIMx_CNT > TIMx_CCR1 else
inactive.

and

Center-aligned mode 1
The counter counts up and down alternatively.
Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting down.

Center-aligned mode 2
The counter counts up and down alternatively.
Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting up.

Center-aligned mode 3
The counter counts up and down alternatively.
Output compare
interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set both when the counter is counting up or down