参考手册上列出了TIMx的输出比较模式,:
1. 输出不变,当CNT=CCR即计数器计数到设定值时
2. active, OC1REF is H,当CNT=CCR即计数器计数到设定值时
3. inactive, OC1REF is L,当CNT=CCR即计数器计数到设定值时
4. toggle, OC1REF toggle,当CNT=CCR即计数器计数到设定值时
5. force active, OC1REF is H
6 force inactive,OC1REF is L
7 PWM mode1, upcounting mode下, CNT<CCR时, OC1REF is H, 否则L
8 PWM mode2, 与PWM mode1相反
OC1REF 还不是最后的输出了?
还有 TIM_TimeBaseStructure.TIM_Period = 0xFFFF;
TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High; 是什么意思?
谢谢!
|