4 Replies Latest reply on Oct 5, 2017 12:22 PM by gabilondo.gorka_2790176

    Using UART component RX Interrupt - Tx Polling


      Hi all,

      I'm a newbie using Cypress platform and i'm currently developing an application where uses rs485 protocol, based on a UART component.

      I'm guessing if there's any possibility to use the UART interrupt for RX and using Tx in blocking and polling mode. I mean, i want to check that UART has sent all the data, by checking UART_INTR_TX_UART_DONE without interrupts. Here an example:



      Rs485_SendData( uint8_t *txbuf, uint16_t len ) {

      uint16_t btosend, bsent;  

          btosend = len;

          bsent = 0;


        while( btosend-- ) {

        UART_UartPutChar( *( txbuf + bsent ) );



           /* Here i want to check by polling if UART_INTR_TX_UART_DONE sets to enable Rx pin of driver */


          return bsent;


      Any suggest?

      Thanks in advance