void USART_Configuration(void) { USART_InitTypeDef USART_InitStructure; USART_InitStructure.USART_BaudRate=115200; //波特率为9600 USART_InitStructure.USART_WordLength=USART_WordLength_8b; //传送位数为8位 USART_InitStructure.USART_StopBits=USART_StopBits_1; //1个停止位 USART_InitStructure.USART_Parity=USART_Parity_No; //奇偶失能 USART_InitStructure.USART_HardwareFlowControl=USART_HardwareFlowControl_None; //硬件流控制失能 USART_InitStructure.USART_Mode=USART_Mode_Rx|USART_Mode_Tx; //发送、接受使能 USART_Init(USART3,&USART_InitStructure); USART_Cmd(USART3,ENABLE); } 可是接受的数据不对 请教高手了 谢谢 |
RE:求教串口问题