我的中断向量设对了,可还是进不了中断,什么问题?
代码很简单,烦请大人指教!
#include "msp430x54x.h"
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P7DIR |= 0x08; // P7.3 output
P7OUT = 0x00;
_EINT();
TA1CTL = TASSEL_1 + MC_2 + TACLR + TAIE ; // ACLK, contious up mode, clear TAR
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
}
// Timer A0 interrupt service routine
#pragma vector=TIMER1_A1_VECTOR
__interrupt void TIMER1_A1_ISR(void)
{
P7OUT ^= 0x08; // Toggle P7.3
}