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 的SPI问题



使用的是UCB0SPI,初始化函数如下:

void SPI_Inint()
{

P3SEL |= BIT1+BIT2+BIT3;    

UCA0CTL 1 |= UCSWRST;     
UCA0CTL0 |= UCSYNC+UCMSB+UCMODE_0; //同步模式MSB优先,3线SPI

UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
}

初始化之后,

while (!(UCB0IFG&UCTXIFG));  

UCB0TXBUF = 0xaa;

单步调试的时候,发现TXBUF没有赋值之前,UCB0IFG = 0x02,赋值之后,UCB0IFG = 0x03,且循环发送时,第二次给TXBUF赋值时,UCB0STAT = 0x20,根据数据手册显示是出现了超限错误。请问这是什么原因