Check UART transmit complete in nRF52832

Hi,

I use  "printf" or "app_uart_put" function to print message to UART., how can I check "all of the data had been transmit out complete"?

Thank you,

Chianglin

Parents
  • Hi,

    When you call printf, all chars in the string will be put into the app_uart FIFO by multiple calls to app_uart_put(), and the library will start processing the FIFO. Then printf returns, all chars have been put into the FIFO. Whenever all bytes have been transmitted and the app_uart FIFO is empty, you will receive a APP_UART_TX_EMPTY event in the event handler. If you have added more bytes to the FIFO in the meantime, you will not receive an event until these bytes have been transmitted as well. There is no other functionality in the library to know when a transfer is completed.

    Best regards,
    Jørgen

Reply Children