|
请问一下,msp430f149串口初始化是这样的,但是为什么进不了中断?
[复制链接]
- WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
- P3SEL = 0x30; // P3.3,4 = USART0 TXD/RXD
- P4DIR = BIT2;
- P4OUT = BIT2;
- ME1 |= UTXE0 + URXE0; // Enabled USART0 TXD/RXD
- UCTL0 |= CHAR; // 8-bit character, SWRST=1
- UTCTL0 |= SSEL1; // UCLK = ACLK
- UBR00 = 0x03; // 9600 from 1Mhz
- UBR10 = 0x00; //
- UMCTL0 = 0x4A; // Modulation
- UCTL0 &= ~SWRST; // Initialize USART state machine
- IE1 |= URXIE0 + UTXIE0; // Enable USART0 RX/TX interrupt
- // IFG1 &= ~UTXIFG0; // Clear inital flag on POR
- _BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt
- }
复制代码 请问一下,msp430f149串口初始化是这样的,但是为什么进不了中断?
|
|