2 Replies Latest reply on Oct 5, 2020 8:44 PM by ToKo_4602001

    CYW20819 UART Tx buffer


      How could we know if UART tx buffer is empty or not?


      If wiced_hal_puart_write() is issued and soon baudrate is changed with wiced_hal_puart_configuration(), baudrate will be chaged in the middle of transmitting data.

      Especially, we should consider baudrate change during UART flow control.


      So we'd like to wait until all buffered data output to UART.



        • 1. Re: CYW20819 UART Tx buffer



          It seems the APIs don't cover your needs exactly. But I suggest you may try the following function:

          void wiced_hal_puart_synchronous_write ( UINT8 * buffer, UINT32 length)

          It is a blocking function and it makes sure your data will go into FIFO before returning from it. So I think It can help you with what you need.


          Best regards

          • 2. Re: CYW20819 UART Tx buffer

            Thank you for your suggestion.


            I tried wiced_hal_puart_synchronous_write().

            But unfortunately I find that this function is not blocked.


            If I change baudrate by using  wiced_hal_puart_configuration() after issuing wiced_hal_puart_synchronous_write(), baudrate is changed during data transmitting.