msp430f5418 uart 发送中断使能
本帖最后由 aelan_gj 于 2013-12-10 09:35 编辑msp430f5418 uart 发送中断使能
初始化完后,要进一次中断么?
UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
UCA0BR0 = 0x03; // 32kHz/9600=3.41 (see User's Guide)
UCA0BR1 = 0x00; //
UCA0MCTL = UCBRS_3+UCBRF_0; // Modulation UCBRSx=3, UCBRFx=0
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCTXIE + UCRXIE; // Enable USCI_A0 RX interrupt
这里必然产生一次空中断,这就有问题了 这个只是使能中断吧?
页:
[1]