This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB on C674x

Hi All, 

I'm looking at some various options regarding enabling USB on the C6745 / C6747. We're looking at streaming data continuously from the device to a PC at a rate of about 2 Mbit/s using bulk transfer.

I've been looking at a couple of options:-

The most obvious is to use the USB peripherals on the device along with the BIOS/USB software stack. However, having had a read of the forums, I'm beginning to suspect that this may not be as easy as one may first assume.

The other option is to go with something like a Cyrpress EZ-USB sat on one of the memory buses, not so dissimilar to http://focus.ti.com/lit/an/spraa13a/spraa13a.pdf

I appreciate that USB is a complex system and thus neither will be wholly trivial. Using the USB peripherals seems like the obvious solution, but I'm worried this may open up a world of pain. Crucially, at the moment, this functionality is only required for internal tools as an option on a reasonably small number of our systems hence unit cost is not critical - more important is fast development and a reliable product at the other end and for this reason, I'm beginning to think that Cypress may be the best way to go. 

Does anyone have any thoughts either way?

Thanks in advance for any advice, 

Jim

 

 

 

  • Hi JimD,

    Can you please provide some more information about the operations you are trying to do ?

     BIOSUSB stack is supported on C6747/C6748 family of boards for  both usb host and device. C6745 is the same family, but the testing is been done on earlier mentioned boards only.

       I don't have much knowledge about the Cypress  and haven't seen many threads on forum regarding implementing it, so in that case you might need to work of your own to get it working. 

     There are couple of working examples on BIOSUSB, which may be a good starting point for you and some more support can be provided once we know application requirement. 

     

    Thanks and Regards,

    Pankaj Anand

  • BIO/USB is a viable solution as long as you can work within it's limitations. Unfortunately, a lot of potential applications out there need something outside of those limitations. For me, I had to match an existing USB setup that did not fit within the BIOS/USB limitations. If you are starting with a clean slate, BIOS/USB HID could be used to send data back and forth. On the PC side, it will look like a standard HID device. No drivers required. Your PC application will need be coded to handle the HID port. It is definitely not a COM port and that irritated a lot people who have existing COM based code.

  • Hi All and thanks for the responses. 

    The C6745 is being set up as a USB slave. Ideally, we'd set up DMA transfers of the data from local memory over the USB. IN our application, we need to continuously stream data across the connection for extended periods, and write it to file at the other end - a suitable analogy may be an audio processing application where the digital audio stream is acquired via A-D converters, processed on the DSP and then sent across the USB for storage at the computer in real time.

    We need to guarantee data delivery which I think leads us to interrupt / bulk transfer methods. It doesn't need to be particularly pretty / efficient, but it does need to be reliable. We can buffer at the DSP so we don't need guaranteed latency, as long as on average, the available bandwidth is sufficient.

    Thanks Pankaj for your suggestion re: HID. I was under the impression that HID only supported a max transfer rate of 64k/s - we need about 2Mbit/s - if it is indeed limited at 64k/s then we can't use that. 

    I understand that BIOSUSB also supports Mass Storage - we could perhaps hack something together that would make our data look like a set of files from the point of view of the PC and it continually downloads and then deletes those files - however, that feels quite messy. 

    I guess from what Norman said that if I can't work out something with Mass Storage, then I may have to reconsider my options?

    Jim

     

     


     

  • You are right. Forgot about the bandwidth requirement. Speed is determined by endpoint type. HID uses an interrupt endpoint. Full speed 64kiB/s or 512kbps. In theory, high speed is 8 times faster to 512kiB/s or 4mbps. I've seen numbers on the web that are 16 time faster; more than one transaction per micro frame.

    HP put out a scanner that used the USB Mass Storage as it's interface. Press the scan button and a single file would appear. Unplug it and the file is lost. The Mass Storage spec does not specify a file system type. Your code could implement a fake FAT16 partition and assume that PC will never try to format it as something else. Mutex'ing the file probably won't be fun.

    So far, TI's line appears to be either buy a CDC-ACM stack for SYS/BIOS from Jungo or move to an OMAP offering and leverage off the Linux USB drivers.

    It is such a shame the USB interface is there for "free" but the lack of included FW excludes its use.

  • Hi Jim, 

    Other than HID and MSC, there are couple of other examples also exist, where the device can user bulk transfer to send the data. Such examples can be used, but I believe you might need to write your own protocol with basic needs over plain bulk transfer. 

     

    Regards,

    Pankaj