LUFA USBlib CDC

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

cross mob
User9239
Level 1
Level 1
Hello, i am using the XMClib V2.0 together with the LUFA USBlib V1.0. I am developing without DaveApps using Eclipse CDT. The VirtualSerialComPort Example from the USBlib is working successfully. In the example, the Out Endpoint is polled in the main loop for received data. Is it possible to avoid polling and get a interrupt when new data is received from the host? What is the difference between DMA and FIFO mode in the USBlib?

Thanking you in advance!
0 Likes
2 Replies
User9239
Level 1
Level 1
Has no one an answer?
0 Likes
AngelB
Employee
Employee
Hi Olnol,

the CDC class does not provide any event signaling when new data is received. You may want to switch to the HID class which performs periodic transfers and where you can use callback for creating or processing the reports from the Host.
USB dirver in XMCLib allows the user to choose between FIFO and DMA modes for the endpoint data handling.
In the DMA mode the core fetches the data to be transmitted or updates the received data on the AHB bus decoupling the CPU from direct Data transfer on USB line.
In the FIFO mode 2KBytes of RAM are reserved to store the data in a FIFO.

Best regards,
Angel
0 Likes