程序如下设置TIM1_CH2N 没有输出是怎么回事了,急!
TIM1_PSCRH =0;
TIM1_PSCRL =0;
TIM1_ARRH =(u8)(2000>>8);//(BEEP_PWM_PERIOD>>8); // PWM use
TIM1_ARRL =(u8)(2000);//(BEEP_PWM_PERIOD);
TIM1_CR1 |=0X80; // EAABLE PRELOAD
TIM1_CCER1 =0X40;// 0B00000001 enable pwm out CH1
TIM1_CCMR2 =0X68;//0B PWM1 MODE ENABLE PRELOAD T2_CHANEL2输出
TIM1_CR1 |=0X01;//EAABLE TIMER1
TIM1_CCR2H = (u8)(1000>>8); // PWM use
TIM1_CCR2L = (u8)(1000); // PWM use |