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

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

cross mob
Anonymous
Not applicable

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.

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

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.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

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.

0 Likes