Associate II
May 4, 2022
Question
STM32F407VGT6 PWM Input mode and PWM Generation mode
- May 4, 2022
- 1 reply
- 1300 views
Hi everyone!
In my project, I use TIM2, TIM3, TIM4, TIM5, in each Timer module I choose PWM Input on CH1, and PWM Generation on CH3 function. My goal is to generate PWM pulse at channel 3 and feed back to PWM Input on CH1 to measure Duty cycle and frequency. For example, in the TIM2 module, I will connect the PWM Generation CH3 pin PB10 to the PWM Input on CH1 pin PA15. Other timer modules are similarly connected. But currently my program cannot measure Duty cycle and frequency. Is this method correct? Is it possible to use PWM Generation CHx and PWM Input on CHx function on the same Timer module?
I appreciate every answer.
This is my program