6 Replies Latest reply on Oct 8, 2017 8:37 PM by 835614343_2592986

    A question about the PSOC5866 UART Rx interrupt

    835614343_2592986

      Hello every one, Hello BOB:

           I set the UART interrupt as 'Rx-on byte received' and keep other parameters as default, then writed a simple ISR as following:

      CY_ISR(Isr_UART_Rx)

      {

          /* ISR Code here */

          //uint8 rxStatus;        

          uint8 rxData;          

          rxData = UART_RXDATA_REG;

          switch(rxData)

          {

             case '1':

              LED1_Write(0u);

              break;

             .........

             default:

              break;

          }

          UART_TXDATA_REG = rxData; 

      }

          I find that evey time immediately after I download the program into the chip,

          the interrupt occurs whenever a character is received;

          But when I powerdown and then powerup the board again, the interrupt always occures after four characters are received,

          which means the Rx interrupt occurs not at byte received but at the receiving FIFO becoming full.

       

          How can I make the interrupt ocurring at each byte received?