ST有个例子 配置如下
USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_Even;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
用计算机接收数据的时候,奇偶校验位作为了数据的最高位,我把USART_WordLength_8b;改成USART_WordLength_9b;就接收不到数据了,不知道问题处在那里,请各位指教。 |