2021-07-28 05:36 AM
Function "PWM Generation CH2N" can not work, channel CH2N don't output PWM signal. But after I changed "tmpccer &= ~TIM_CCER_CC2NE;" to "tmpccer |= TIM_CCER_CC2NE;" (in file stm32h7xx_hal_tim.c), it works well.
Hoping developers of HAL library will fix this mistake soon.
Solved! Go to Solution.
2021-07-28 06:26 AM
The complementary timer channels are started with HAL_TIMEx_PWMN_Start. No bug here.
2021-07-28 06:26 AM
The complementary timer channels are started with HAL_TIMEx_PWMN_Start. No bug here.
2021-07-28 06:41 AM
I called "HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);", did you mean that?
Could you please tell me which chip do you use? Thank you.
2021-07-28 06:52 AM
Nope, I mean HAL_TIMEx_PWMN_Start.
To start channel 2N:
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_2);
I use many different chips.
2021-07-28 06:52 AM
Thank you very much! I found that founction in file "stm32h7xx_hal_tim_ex.h" and solve my problem :)