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.

msp430fr6972定时器问题求教

Other Parts Discussed in Thread: MSP430FR6972

单片机型号:MSP430FR6972

问题:项目需求需要多只设备同步定时器,在使用过程中发现,当我对定时器进行人为干预后,第2次定时器触发的时间没有到预定的值。

使用的是定时器B0.

配置如下

void TimerB0_Init(void)
{      
  TB0CCTL0 = CCIE ;//                  // TB0CCR0 interrupt enabled
  TB0CCR0 = 7;
  
  TB0CTL = TBSSEL__ACLK | MC__UP; //ACLK, UP mode 
}

定时时间为244us,不人为干预的情况下,定时器正常触发,当某一时刻,我修改TB0R 的计数值,使得多只设备的定时器相同时间触发,基本同时,几十US以内,(这是第一次定时器中断),然后第二次定时器中断产生的时间不精确,不定,可能150us,也可能173us,总是不确定,这个是什么原因?

无图无真相: