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.

[MSP430] 定时器B的中断问题



#include <msp430x44x.h>
int y;
void main( void )
{
  // Stop watchdog timer to prevent time out reset
  WDTCTL = WDTPW + WDTHOLD;
  TACTL=TASSEL1+TACLR+TAIE;//TBCTL=TBSSEL1+TBCLR+TBIE;
  TACCR0=100;//TBCCR0=100;
  TACTL|=MC0;//TBCTL|=MC0;
  _EINT();
  while(1);
  
}
#pragma vector=TIMERA1_VECTOR//#pragma vector=TIMERB1_VECTOR
__interrupt void w(void)
{
  y=TAIV;//  y=TBIV;
}
这段程序在IAR Embedded Workbench环境中软件仿真是可以进入中断的,但是仿此,将定时器A改为定时器B,即将上述程序中具有双斜杠的的语句,用双斜杠后面的语句代替前面的指令。仿真根本不进入中断。这是什么原因呢?