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.

how to use usb communicating with PC in C6747

I download and install the BIOSUSB.but the examples of BIOSUSB and rtfs are not this example communicating with PC in C6747.It just has MSC and HID examples.

Anyone can tell me how to work?

  • Hi liangxiao,

    I'm not understanding your question. What are you trying to achieve?

    To use USB at the C674x as a Device. Please see the GSG.


    Make sure you install the Items listed, specially item 3 (PSP), 6 (USB driver), and 7 (RTFS). After you install each of the packages, read the release notes and set the environmental variables needed so you do not get build errors.

    I used the project below (when you install the USB driver - that depends on the other components mentioned above) to make my computer read an MMC card plugged in the EVM using a micro USB cable. It showed in Windows as a mass storage.

    ...\biosusb_01_00_00\packages\ti\biosusb\examples\usbdevmsc\build

     

  • I run the programme "...\biosusb_01_00_00\packages\ti\biosusb\examples\usbdevmsc",and SD insered.USB table is connectted between the target (USB1 port) and Host PC.

    CCS's stdout is


      ************************************************
      PSP BIOS USB Device Mass Stoage Test Application
      ************************************************

     

    EDMA : EDMA Initialization Succeeded

     MMC/SD media selected for mass storage
    Ensure MMC/SD card is inserted

     

    MY question is

     "after I run this programme,how to communicate between the target (USB1 port) and Host PC?"

     

     

  •  

    Not sure if that is what yo are asking... please see page 17 of the document  ...\biosusb_01_00_00\docs\BIOSUSB_UserGuide.pdf.

    Insert the card on the board, build and load .out, connect the micro USB cable between the board and your Windows computer, you should see appear "removable disk"or something similar on your Windows computer (My Computer in Windows Explorer).

  • in a word:

    I want to transmit a faw bytes (not file) from PC to DSP.

  • http://en.wikipedia.org/wiki/Universal_Serial_Bus#Device_classes

     

    The USB HID class is used to communicate with Human Interface Devices such as USB interfaced Keyboards, PC Mouse, Trackball, etc.  It can quickly send a few bytes of data in both directions between the PC and the USB HID device peripheral.  No special driver software is needed on the PC to communicate with any common sort of HID device under MS Windows / LINUX. There are standard API library functions for MS Windows, LINUX, et. al. for communicating with HID devices .  So if you can use the HID software to make the DSP board look like a generic HID device, you can probably achieve your goals, though usually it is a bit easier to send data from the device to the PC than it is to send data from the PC to the device, but both are possible.

     

    The more straightforward possibility would be to use a CDC Communications device class software configuration on the DSP board so that the DSP board looks like a USB attached RS232 serial port to the MS Windows / UNIX PC in which case you could just send data to the DSP board via any of the usual serial port supporting terminal programs or programming APIs.  You may need a simple driver configuration on the PC side so that it can recognize the USB vendor/device ID configuration you have as a serial port type of device, though usually this is easy to achieve or is given to you by the provider of the CDC device.

     

  • I am now developing USB in C6747, and I also only want to send raw data to PC as a peripheral device. I checked this reference http://en.wikipedia.org/wiki/Universal_Serial_Bus#Device_classes, and it seems that I should use it as Communications and CDC Control. But I wonder where I can found the window driver and a sample code(not with BIOS will be better)?

  • Hi york yan

    Do you get an answer to your question?. I have a same one, and by now I didn´t get a communication way from C6747 and PC.

  • York Yan, Leticia,

    BIOSUSB package supports the following classes of applications by default

     

    1. MSC - Mass Storage Class
    2. HID - Human Interface Device Class

    The above 2 class of applications are available in both Host and Device USB modes.

    From you posts it seems that you are intending to develop a new custom application/class for communication with PC host.  Given this I would recommend you to use HID Class application and implement your own communication application on top of it.  Pl. refer to the HID examples and the associated documentation in the docs directory for further information on the API usage.

    Another option would be to develop a custom class on top of the BIOSUSB stack using the API's provided in the DCD API document.  In this way you can do the minimal things needed for achieving your goal without the need to understand how HID Class/application works.

    Again the choice would depend on your application characteristics.  If your application has characteristics similar to a HID class app then 1st approach would be the way to go.  On the other hand if your application is of some other nature then I would recommed you to go with the second approach.

    Pl. note that we do not package CDC class as part of the BIOSUSB package.  If you need the same you could contact our 3rd party vendor Jungo (www.jungo.com from whom BIOSUSB stack has been licensed) for this class.  Pl. also do note that the CDC implementation from Jungo is a certified product and hence would be preferable option if in the end you decide that is was you need.

    Apologies for the delayed reply I did not come across this post earlier.

    regards

    swami

  • Hi Ana Leticia

    We still can not use USB of C6747 to communicate with PC. We use UART instead though its low bandwidth is hardly meet our requirements. We also use a USB bridge chip FT245 to communicate with PC to provide high bandwith communication.

    Because depend on our capability, we do not have the time and quality to develop a USB firmware and driver independently. We also contact Jungo which provides CDC class implementation on both firmware and driver. But we cannot afford the price. So now, the USB of C6747 on our board no use.

    A series of MSP430 provide USB with class HID, MSC and CDC. We are looking forward TI to offering such thing in near future. Hope this won't be long, or we have to change our project scheme.

  • York Yan,

    Pl. refer to my post earlier.  BIOSUSB offering does support HID, MSC classes on C674x platform.  Yes agreed CDC is not included in the default package.

    regards

    swami

  • Hi, swami

    I know BIOSUSB support HID and MSC in binary code. But I still cannot figure out how to use it to communicate with PC. We want a high bandwith method, so HID is not enough. And how can I use MSC to communicate with PC. For example, I just want to send some data in high speed, ex 1MB/s. Is there any sample code on both DSP and PC I can refer to?

    regards

  • York Yan,

    I think your need is primarily limited by the application availability at the PC end.  One can very well develop a custom application on top of BIOSUSB stack for exchanging huge volumes of data at high throughput but to accomplish this one would need to have a PC Host side application.

    I feel as of today the availability of PC Host side application is your primary bottleneck.

    MSC app is for a specific purpose to support Hard Disk type applications and is not generally suitable for custom use cases.  This is the reason I had recommended to go in for a very simple custom application but this would need a custom application on PC end too.

    We do not have such an app readily available today but we definitely will keep this need as we plan for the future.

    Hope the details provided above are helpful in addressing your need.

    regards

    swami

  • I have a similar problem. I would like to implement a simple CDC device so our PC application can use simple COM port drivers to communicate with our product. I have done this with other devices.

    The TI 5509 fixed point DSP provided enough support through the CSL (Chip Support Library) to implement USB connectivity without requiring DSP/BIOS (although it could be integrated into a DSP/BIOS application).

    I am concerned that the JUNGO library solution is too large to fit into our application with all of the core operation that must be done.

    Are there plans to support the 6745 with the same lower level USB device implementation via CSL or a TI application note that does not require all of the overhead of the JUNGO library?

  • Hi David,

    To date, there are no plans of another software offering for USB for C6747...

  • David,

    Pl. refer to the datasheet of BIOSUSB delivery.  It has information on size of device specific libraries.  That would be help in understanding whether the solution would fit within the footprint requirement of the product.

    regards

    swami

  • Swami,

    Thanks for the reply. I reviewed the BIOSUSB Datasheet (version 01.00.00) and found several graphs and tables describing the USB data throughput and CPU usage, but nothing regarding the library memory footprint.

    In the BOISUSB User Guide it details the build options used for the JUNGO device stack. The parameter CONFIG_MEMPOOL is set to 1, and the CONFIG_MEMPOOL_SIZE is 5000000. My system has no external memory. I will be using the C6745 alone for my entire application. Will there be problems with the stack as built?

  • More questions:

    In reviewing the files that came with BIOSUSB, I am noticing that for the usbdevhid application there are 5 threads running for the Jungo stack. In the usbdevhid.tcf file I notice that each of the threads was initially configured for 4096 MAUs of stack space then later changed to 8192, and finally to 32768.

    For my application I do not need the MASS Task, but assume that I will need the others (Controller, Core, Class, Monitor, and HID (which I will trade for CDC)).

    This seems like an excessive amount of overhead to get USB functionality, in a device whose core operation has nothing to do with USB. My USB will behave as a device and will enumerate as a CDC (virtual COM port) so PC application software can configure/monitor the measurements made by the instrument.

    My question is; would you recommend that I pursue the BIOSUSB approach or develop my own USB CDC device? Again, my C6745 is stand alone, there is no external memory for stack usage.

    Thanks for any suggestions.

  • David,

    When you mention that the product does not have any external memory what exactly do you mean by that?  Is the code running out of the ROM? What will you use for RAM? Both BIOS and USB stack need some amount of RAM (that is configurable).

    Pl. clarify.

    regards

    swami

  • Swami,

    We are intending to use the 256K of L2 memory/cache as program and data memory. We will copy the code from external I2C FLASH memory, into the internal RAM, and run the code from the internal L2 memory. All DSPBIOS and USB memory requirements will need to be taken from the L2 data memory.

     

    Dave

  • I use USB of C6747 to communicate with PC in the high bandwith.

    do you succeed?

    if you do ,can you tell me?

  • Dave,

    Can you clarify how much of the (256K) memory would be available for USB stack?  In parallel we will try to get to the lowest possible memory options and will add the lib size data to the data sheets in future releases.

     

    You can remove the MSC class app and add support for CDC class. 

     

    The stack that is available on C674x platform is licencsed from Jungo.  As you would know this stack has been running on many embeded platforms.  The threads and the structure are needed for proper functioning of stack.  As this is a portable stack the threads provide the platform specific adaptations while the core of the stack is maintained generic and re-usable.

    regards

    swami

  •  

    hi,

    I find the "..\biosusb_01_00_00\packages\ti\biosusb\examples\" which have three examples.but none can be used for me .

    I want to use the usb of C6747 communicating with PC in high speed.

    Can you help me?

  • Zhang

    The biosusb package contains three example two for device mode configuration (usbdevhid, usbdevmsc) and one for host mode configuration (usbhosthid). Can you explain in detail what is configuration you are looking for (device or Host)? can i know what is your use case scenario ?

    You are referering to old biosusb release, now latest biosusb package (1.10.01) is available.

    Regards

    Ravi B

  • Sorry zhang, i have not reffered your previous mail-chains. You can ignore this.

     

  • Can you tell me this latest biosusb package(1.10.01) address? I need the dsp as device and pc as host. The host send data to the device or the device send data to the host. The speed is high speed(more 10M). How do I?
  • Hi,

    You would have to develop a custom application on C67xx platform oer BIOSUSB stack and also on PC to transfer data between them. 

    Another option would be to develop the CDC class app on C67xx platform over BIOSUSB and then interface with PC as a USB CDC ACM device.  PC platforms support CDC-ACM class by default.

    3rd option would be to approach a 3rd party to develop/buy an existing CDC stack and port it on BIOSUSB stack.  Jungo have a readymade solution for CDC class support that would work seamlessly on BIOSUSB stack.

    regards

    swami

  • Dave,

    We could do some analysis on the memory needs of the BIOSUSB stack without the Function Driver's that are packaged today.  I assume this is what you would be looking for as in your case you would develop a custom Function driver.

    Dynamic Memory Needed for the stack to function : 50KBytes  (You would have to factor in any dynamic memory needs w.r.t your application beyond this figure)

    Static Memory Needs of various Libs involved is as below

    Device Core Lib (dcd, core, jos, port, portcom) Program Memory : 60KBytes.

    Device Core Lib (dcd, core, jos, port, portcom) Data Memory : 7.5K

    1.1.1          Memory usage for device libraries

    Component

    Memory Statistics (Bytes)

    Program Memory

    Data Memory

    Total

    Initialized

    Un-Initialized

    ti.biosusb.device.dcd.a674

    13504  

    218  

    128  

     

    ti.biosusb.device.core.a674

    16382 

    262

    92

     

    ti.biosusb.device.jos.a674

    13760  

    704  

    310  

     

    ti.biosusb.device.port.a674

    10304  

    382  

    4964  

     

    ti.biosusb.device.portcom.a674

    8864  

    592  

    12  

     

    ti.biosusb.device.fd.hid.a674

    4064  

    60  

    0

     

    ti.biosusb.device.fd.scsi.a674

    13408  

    2046  

    1820  

     

    Total

     

     

     

     

    We can further optimize the dynamic memory needs but we will support the same in the next releases.  The above information is being added as part of the BIOSUSB Data sheet.

    Given the above data I think BIOSUSB stack will fit well within the 256K memory need of your product.

    regards

    swami

  • Swami,

    Thanks very much for researching this. I will review and weigh my options.

    I have been reading the USB2.0 User's Guide and think a minimal CDC implementation will not be too difficult to implement.

    Regards,

    Dave

  • Hi Dave,

    Did you succeed in making the CDC implementation? It will be great if you can share some information.

    Thanks

     

  • I am doing it .but not succeed.

    if  U know how to do ,please tell me.

  • Lingxiao,

    Pl. refer to the DCD api documentation on the API's needed to create a CDC class application over BIOSUSB stack.

    regards

    swami

  • All,

     

    After long communications with TI, it seems to me that the C674x USB interface is (and will) not be supported by TI.

    TI has a single "solution", which is to purchase consulting services from a company named "Jango".

    Yep... I'm not joking... big TI refers its customers to a foreign company in order to make basic use of an internal sub-system of one of its most prestige DSPs.

    Ignoring the ridiculous overprice charge Jango asks for its services, (which some of the previous writers have mentioned), there are cases which even surrendering to this blackmail is not an option (due project/product confidentiality, location, and more).

    We (my company) are forced to try to develop our own USB peripheral (device) driver and stack for the C6748. Our requirements are similar to other posts here: Simple full duplex communication (one bulk in, one bulk out).

    Since it's a complicated development task (due to the lack of support), we offer anyone who is interested, to share the efforts - and the upshot.

     

    Feel free to contact me regarding any question or comment you might have - uri at zoro-sw dot com

     

     

    Uri

  • Hi, all

    I agree with Uri (how about your progress?), and I am also trying to develop own USB stack for my original C6745 board.

    I am still having troubles as I mentioned in "C6745 USB0 FIFO0 TX does not work" post before, but I hope my code is helpful to anyone who wants to develop without a TI recommending NOT-FREE solution.