每个通用定时器有4个PWM通道,通道1和通道2用CCMR1配置,通道3和通道4用CCMR2配置,这里我们用的是CH2,所以用CCMR1配置。 OC1M[2:0]:输出比较1模式 110:PWM模式1-不管向上计数还是向下计数,一旦TIMx_CNT 111:PWM模式2- 在向上计数时,一旦TIMx_CNT>TIMx_CCR1时通道1为有效电平,否则为无效电平。 2.捕获/比...
As well as the ARR register, there are four Capture/Compare channels, each with its own register, CCR1, CCR2, CCR3, CCR4. These are also compared continuously with the value in the CNT register and each can be configured for a variety of behaviours when there is a match. Note that a...
该寄存器总共有 4 个,对应 4 个 输通道 CH1~4。下面以CCR1为例 在输出模式下,该寄存器的值与 ...