cancel
Showing results for 
Search instead for 
Did you mean: 

How to use timers complementary output is for regular peripherals programming?

Ravi1
Associate II

I've been trying to use TIM1CH2N to generate PWM to control ws2812b RGB LED. I have got one working library for TIM1CH2, but I'm unable to generate the same signals in the CH2N pin (STM32H750VB)​. Can anyone help me out to resolve this issue?

1 ACCEPTED SOLUTION

Accepted Solutions

Issue was with my function, earlier I used HAL_TIM_PWM_Start(); function to start pwm, the actual one i should use is HAL_TIMEx_PWMN_Start(); to generate pwm signal on complementary configuration.

View solution in original post

2 REPLIES 2

To get both complementary outputs working, all you need is to set TIM1->CCER.CC2NE and set up the respectve pin in GPIO.

JW

Issue was with my function, earlier I used HAL_TIM_PWM_Start(); function to start pwm, the actual one i should use is HAL_TIMEx_PWMN_Start(); to generate pwm signal on complementary configuration.