中文English
stm32芯片引脚图ichaiyang 2024-05-10 3:48 37
First of all, what's your control output, pwm? If it's PWM you need to modify it in two places one is the structure TIM_TimeBaseInit(TIM2, & TIM_TimeBaseStructure ; Find the ti...

How to change the counter pin of stm32 timer?

First of all, what's your control output, pwm? If it's PWM you need to modify it in two places one is the structure TIM_TimeBaseInit(TIM2, & TIM_TimeBaseStructure); Find the timer number corresponding to GPIOA.2, you can look it up in the manual, it doesn't have to be TIM2 but just to give you an example another struct TIM_OCInit(TIM2, & TIM_OCInitStructure); You'd better find a routine with comments, there are many on the Internet, just search \"stm32 timer\