PDK: UART EDMA, Tx fifo fix in UART_close().
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 4 Oct 2016 10:53:20 +0000 (16:23 +0530)
committerFrank Livingston <frank-livingston@ti.com>
Wed, 5 Oct 2016 18:04:58 +0000 (13:04 -0500)
psdk_cust/pdk_k2g_1_0_1_0_eng/packages/ti/drv/uart/src/v0/UARTDMA_v0.c

index 8831e5e45a9b14818913ac99eb86d8c48a3f2728..983b63a66683c3b52c49eb367876df7bb5646ee7 100644 (file)
@@ -320,6 +320,8 @@ static void UARTDMA_close_v0(UART_Handle handle)
     object = handle->object;
     hwAttrs = handle->hwAttrs;
 
+    // wait for Tx fifo to get empty
+    while (!UART_fifoEmpty_v0(hwAttrs->baseAddr));
     /* Disable UART and interrupts. */
     UART_intDisable_v0(hwAttrs->baseAddr, UART_INT_RHR_CTI | UART_INT_THR);
     UART_operatingModeSelect_v0(hwAttrs->baseAddr, UART_DISABLED_MODE);