标红处什么意思啊

2019-03-23 17:33发布

TIM1->CR1 = 0x04;

        TIM1->SMCR = 0;//禁止从模式

        TIM1->IER = 0;//禁止所有中断

        TIM1->CCER1 = 0; //禁止PWM输出
        TIM1->CCER2 = 0;

        TIM1->CCMR1 = 0x60; //PWM1模式,禁止预装载,通道配置为输出
        TIM1->CCMR2 = 0x60;
        TIM1->CCMR3 = 0x60;

        //prescale = div1 @ 16MHz -> 62.5ns/count, Full scale = 4.09ms
        TIM1->PSCRH = 0;
        TIM1->PSCRL = 0;

        TIM1->ARRH=hArrPwmVal/256; //PWM周期设定
        TIM1->ARRL=hArrPwmVal%256;

        //disable repetition counter
        TIM1->RCR = 0;

  TIM1->CCR1H=0;TIM1->CCR1L=0;//占空比输出均为0
  TIM1->CCR2H=0;TIM1->CCR1L=0;
  TIM1->CCR3H=0;TIM1->CCR1L=0;

此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。