请问msp430f437的 USART SPI 和msp430f2471的 USCI SPI 除寄存器不同,应用中还有什么重要不同点?谢谢!
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.
请问msp430f437的 USART SPI 和msp430f2471的 USCI SPI 除寄存器不同,应用中还有什么重要不同点?谢谢!
您好:
我是分别用msp430f437和msp430f2471的spi与ads1298通讯的,msp430f437的spi控制ads1298没有问题,可是用msp430f2471的spi时,程序直接执行时能通过的,结果也是正确的,可是在debug下,如果暂停之后再执行,spi通讯的数据就会有错误。您们应用过程中可有类似经验?
msp430f2471 spi初始化如下:
void SPI_Init(void)
{
P5SEL |= 0x0E; // P5.3,2,1 option select
UCB1CTL1 |= UCSWRST;
UCB1CTL0 |= UCMST + UCMSB + UCSYNC; //3-pin, 8-bit SPI master //
UCB1CTL1 |= UCSSEL_2; // SMCLK
UCB1BR0 = 0x02;
UCB1BR1 = 0;
UCB1CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
}