外接串口Flash,使用4线SPI总线,问题:模式设置为 UCMODE_2 时,执行完UCA1CTL1 &= ~UCSWRST;之后,UCFE就被置1,请问是什么原因?
程序如下:
P8SEL |= BIT1 + BIT2 + BIT3 + BIT4;
UCA1CTL1 |= UCSWRST; // **Put state machine in reset**
UCA1CTL0 |= UCMST + UCSYNC + UCCKPL + UCMSB + UCMODE_2 ;//+ UCSTEM ; // 4-pin, 8-bit SPI master
// Clock polarity high, MSB
UCA1CTL1 |= UCSSEL_0 ;// SMCLK
UCA1BR0 = 0x02; // /2
UCA1BR1 = 0; //
UCA1MCTL = 0; // No modulation
UCA1CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA1IE |= UCRXIE;