USB UART Interrupt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
alma_284856
Level 3
Level 3
First like received

 Hi everyone,

   

I am using a PSOC5LP with USBUART to send data by hyperterminal.

   

My problem is that I can find any interrupt when I press key on hyperterminal.

   

I would like to interrupt my loop while(1) when a data is send by hyperterminal to USBUART;

   

How can I do?

   

I saw on the exemple USBUART they use this, but it doesn't work for what I need:

   

if(USBUART_1_DataIsReady() != 0u)               /* Check for input data from PC */

   

        {   

   

            count = USBUART_1_GetAll(buffer);           /* Read received data and re-enable OUT endpoint */

   

            if(count != 0u)

   

            {

   

                while(USBUART_1_CDCIsReady() == 0u);    /* Wait till component is ready to send more data to the PC */ 

   

                USBUART_1_PutData(buffer, count);     nt == BUFFER_LEN)

   

                {

   

                    while(USBUART_1_CDCIsReady() == 0u); /* Wait till component is ready to send more data to the PC */ 

   

                    USBUART_1_PutData(NULL, 0u);         /* Send zero-length packet to PC */

   

                }

   

            }

   

        }  

   

 

   

Thank you

0 Likes
4 Replies