This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2530定时器有误差!

Other Parts Discussed in Thread: Z-STACK

HAL_ISR_FUNCTION( halTimer1Isr, T1_VECTOR )
{
  static uint16 dimmingDelay=0;
  HAL_ENTER_ISR();
  IRCON = 0x00;                  //清中断标志, 也可由硬件自动完成
        dimmingDelay++;
        if(dimmingDelay==100)
        {
           P0_6=0;
        }
        
        if(dimmingDelay==110)
        {
           P0_6=1;
           dimmingDelay=0;
        }        
     }
  HAL_EXIT_ISR();
}

上面是定时器1的中断程序,定时器1初始化为8分频,模模式,TICC0=0X00FF,也就是64us中断一次,正常的话P0_6应该是640US的高电平,用示波器测量高电平有正负30US的误差!请问各位大侠这是什么原因引起的,该如何解决!