- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.