2 Replies Latest reply on May 1, 2016 2:26 PM by samir.fernandes

    UART RX Interrupt

    samir.fernandes

      Hi everybody! 

         

      I'm new at the forum and in psoc programming as well. I've been trying to get UART communication to work, but i'm facing some problems. I want to receive 6 bytes through the RX and use them in my routine. At first, to get to know how the interrupts work I've tried to fire the interrupt sending a number through realterm, I did fire the interrupt, but I'm not getting out of it. Could you guys help me out? Thanks =D

        • 1. Re: UART RX Interrupt
          user_1377889

          Welcome in the forum!

             

          Some suggestions:

             

          specify "flag" as volatile

             

          clear all pending interrupts not only the masked

             

          Do not send back a character within the interrupt handler!!!

             

          What makes you think that your interrupt handler is entered, but not exited??

             

          The LED will change for some  µs which you cannot see with the naked eye.

             

          What Cypress kit are you using? -049?

             

          A working solution: Set uart to "Internal interrupt" and in main-loop check PC_SpiUartGetRxBufferSize() for the number of characters received.

             

           

             

          Bob

          • 2. Re: UART RX Interrupt
            samir.fernandes

            Thanks for your reply, Bob!

               

             

               

            The command to clear all pending interrupts is: 'RX_isr_ClearPending();'?

               

            I assumed that the interrupt was fired because I put a line to write data to the terminal inside of the CY_ISR(RX_isr). 

               

            I'm using the CY8CKIT-049-42xx.

               

            Am I able to receive 6 byte long data using internal interrupt? Thanks