since I need a USB-CDC Driver for some projects, I tried the USB-CDC driver from the demo “lwIP_Demo_Rowley_ARM7”.
In the description, it says that it does not have a great performance due to heavy queue usage. I benchmarked the RX performance and compared it to the driver provided by ATMEL. The results when I do not process the received bytes any further:
FreeRTOS CDC driver: ~71 kbyte/s (RX)
ATMEL CDC driver: ~850kbyte/s (RX), which is pretty close to the theoretical maximum
Since the ~71 kbyte/s are not sufficient, I thought about implementing the ATMEL driver into the FreeRTOS environment. The biggest difference I can see, is how the received data gets taken out of the endpoint FIFO:
FreeRTOS: The bytes are taken out of the FIFO in a Task and written to a queue (byte for byte)
ATMEL: The bytes from the FIFO are copied into a buffer during the Interrupt
What walls would I run into when taking the ATMEL driver ? Where do you see the problems ?
Thank you very much for reading all this and giving me suggestions