现在用STM32做一个无刷电机的驱动,需要一个上桥关闭(CC1P,CC2P,CC3P),下桥PWM输出(CC1N,CC2N,CC3N)
在用STM8时,做如下配置
//下桥PWM控制,上桥禁止输出
TIM1_CCER1=0x44;
TIM1_CCER2=0x04;
TIM1_CCMR1 = (TIM1_CCMR1&0x8f)|0x60;
TIM1_CCMR2 = (TIM1_CCMR2&0x8f)|0x60;
TIM1_CCMR3 = (TIM1_CCMR3&0x8f)|0x60;
可STM32怎么配寄存器都不行?是STM32比不上STM8的功能还是我不了解?
|