Presently, we don't have project exactly matching the requirement.
But these inks may be useful:
You can check the USBFS Audio PSoC3/5LP Code Example available at this link to understand streaming via USB:
It's interesting that people claim to be getting nearly 600kB/s via CDC USBUART; that would be ideal as I would be able to just DMA data from my acquisition block directly to it. However, while I've found plenty of forum posts referring to DMA with USBUART, the datasheets don't mention this at all; and I can't find any examples of how to do it (a couple of posted projects say they do it but there's nothing in the code).
Can you confirm that this is actually possible, and can you point me at any documentation for it?
There is a similar theme here: Continuous sampling and data transfer using DMA and USBFS
I tried to check the maximum speed with the help of the attached program. (800 kB/s max)
CDC_test_800.zip 26.9 K
Aha, that makes things clearer.
So it seems that you can't do DMA into a CDC device --- you can only DMA into a raw USB endpoint. However, a completely brute force approach which just calls USBUART_PutData() lots can still achieve the required bandwidth way higher than I need --- even through a hub I'm getting 500-600kB/s. It never occurred to me this was possible!
This suggests that what people have been suggesting is DMAing from my data acquisition module into RAM, and then pushing each 64 byte frame to the CDC output from software. That has the advantage of being really easy, and also makes it simple to detect underruns (if the CDC device isn't ready to send when the DMA-complete interrupt fires...).
So I'll give this a try, and if this isn't good enough, come back and ask about raw endpoints. Cheers!
(FWIW, CDC works absolutely fine, and I was getting about 550kB/s, but custom endpoints aren't nearly as scary as I thought and with manual DMA mode enabled in the USBFS component I'm getting 800kB/s.)
Are you sure that there is no data loss at this speed?
How did you manage it?
It's surprisingly trivial. Source code here:
It's all bulk data, which has reliable delivery and checksumming, and just to be sure I have a test routine which integrity tests the data on arrival, and it all looks fine.
The most difficult bit was the WCID stuff to let me use libusb on Windows. (Naturally, it all works fine on Linux.)