• STM32串口通信如果使用奇偶校验,需要设置数据位长度为9bit
	
USART_InitStructure.USART_BaudRate = 9600;             
USART_InitStructure.USART_WordLength = USART_WordLength_9b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_Odd;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init( USART3, &USART_InitStructure);			

相关文章:

  • 2021-06-01
  • 2021-09-21
  • 2021-07-30
  • 2022-12-23
猜你喜欢
  • 2021-09-02
  • 2021-07-23
  • 2022-12-23
  • 2022-01-07
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案