According to STMCube, one may use channels 1,2 as encoder, and channels 3,4 as PWM output simultaneously.I doubt that.The moment the SMCR register bit 0 is activated, PWM disappeaars.This makes sense, as there is only one counter register.Best Regard...