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.

UART模式和SPI模式的切换



在使用USART1的时候,我用了它的两种模式,UART模式和SPI模式,一直有外设把数据发送到UART模式的RX管脚,在切换工作模式的时候需要注意什么吗?

我现在出现的情况是这样的:

1.如果一直处于UART模式程序没有跑飞

2.如果程序刚开始处于UART模式,一段时间以后切换到SPI模式,只要不切换回UART模式,程序也不会跑飞

3.程序刚开始处于UART模式,一段时间以后切换到SPI模式,之后切换回UART模式,程序跑飞