3 Replies Latest reply on Nov 10, 2016 9:13 PM by anks

    !!!!   Help in PSocCY8KIT-059- USBUART!!!!

    vinay.kushwah_1925991

      Hi,

         

       

         

      I need help in creating USBUART ISR.When data is coming through ISR in USBUART i want to give semaphore to some function that can perform some action.

        • 1. Re: !!!!   Help in PSocCY8KIT-059- USBUART!!!!
          MagnusLundin

          Perhaps, and I have not tested this, you can set up the USBFS component to use DMA with Automatic Buffer Management and then configure an interrupt when DMA has transferred some incoming data. There are several interrupts active that might be used to indicate incoming data to your program, but they are deeply involved with the technicalities of USB transfer, you change anything there in the wrong way and nothing will work.

             

          The easy way is to use USBUART_DataIsReady() in your main loop. It is not an interrupt but it will work and get stuff done without to much problems. You could say that you implement your own event handler system by checking I/O  and timing conditions in the main loop and calling the appropriate handlers.

          • 2. Re: !!!!   Help in PSocCY8KIT-059- USBUART!!!!
            vinay.kushwah_1925991

            Hi Magnus,

               

            Thanks for Answer. I Implemented USB UART using polling method( Continuously checking DataReady Function). But what i am looking for is  USBUART ISR. Whenever data is coming i should get interrupt  and with this interrupt i can process some work(Example  i am passing semaphore to other function).

            • 3. Re: !!!!   Help in PSocCY8KIT-059- USBUART!!!!
              anks

              There are ISR for each endpoints inside the file USBUART_episr.c. You can add your code in the OUT EP. When host is sending data to device OUT EP ISR will be triggered.