You are here

!!!! Help in PSocCY8KIT-059- USBUART!!!! | Cypress Semiconductor

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

Summary: 3 Replies, Latest post by ANKS on 10 Nov 2016 09:13 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
vinay.kushwah_1925991's picture
User
22 posts

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.

 

 

Magnus Lundin's picture
User
31 posts

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.

 

 

vinay.kushwah_1925991's picture
User
22 posts

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).

ANKS's picture
Cypress Employee
88 posts

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.

 

Log in to post new comments.