while(1)
{ USART_SendData(USART1,0x33);
while(USART_GetFlagStatus(USART1,USART_FLAG_RXNE) == RESET);
temp=USART_ReceiveData(USART1) ;
USART_SendData(USART1,temp);
while (USART_GetFlagStatus(USART1,USART_FLAG_TXE) == RESET);
}
}
串口配置也改成了“USART_InitStructure.USART_Mode=USART_Mode_Rx|USART_Mode_Tx;”
只收到一个3.....
楼主快回来啊~~~ |