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.
本人在使用MSP430F5438A 的TimerB的时候,发现运行不正常,定时器初始化如下:
void TimerB_Init(void)
{
TB0CTL = CNTL_0;
TBCCR0 = 50000;
TBCCTL0 = CCIE; // TBCCR0 interrupt enabled
TB0CTL = ID_3; //8分频
TB0EX0 = TBIDEX_2; //再3分频,总共24分频,则每次计数为1us
TB0CTL |=TBSSEL_2 + MC_1 + TBCLR; // SMCLK, upmode, clear TBR
}
接的晶振为24MHZ,但是运行时发现,定时器中断远远少于50000us,可能只有几百微秒就中断一次了,不知道是什么原因