why is there a delay between (DR register written) and (data really showed) in UART on STM32F103CB?
问题 I'm curious about the delay time between the title mentioned, I toggled an IO when I wrote data into UART->DR, the delay time varies from 3 micro seconds to 10x micro seconds int main(void) { /* initial code generated by STMCubeMX */ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_USART1_UART_Init(); while (1) { HAL_Delay(50); if (USART_GetFlagStatus(&huart1, USART_SR_TXE) == SET) { USART_SendData(&huart1, 'F'); } } } void USART_SendData(UART_HandleTypeDef *huart, uint16_t Data) { assert