我把USART配置成同步模式,在while中不停发送0xf8,RX出来的波形这样,请问数据对吗,
// USART1 in synchro-mode
usart_init_struct.USART_BaudRate = USART_BR;
usart_init_struct.USART_WordLength = USART_WordLength_8b;
usart_init_struct.USART_StopBits = USART_StopBits_1;
usart_init_struct.USART_Parity = USART_Parity_No;
usart_init_struct.USART_Mode = USART_Mode_Tx;
usart_init_struct.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_Init(USART1, &usart_init_struct);
usart_clock_init_struct.USART_Clock = USART_Clock_Enable;
usart_clock_init_struct.USART_CPOL = USART_CPOL_Low;
usart_clock_init_struct.USART_CPHA = USART_CPHA_1Edge;
usart_clock_init_struct.USART_LastBit = USART_LastBit_Enable;
USART_ClockInit(USART1, &usart_clock_init_struct); |