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.

TMS320F28P650DK: Basic CDC USB Device Code

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Tool/software:

Dear Forum,

I have built a power controller using the TMS320F28P650DK with USB connectivity. The intent is to push data from our device to a host computer using the USB port as a CDC serial port for display in a terminal such as Teraterm.

From a USB perspective, our device is self powered so I have just used D+ and D- (pins D16 and E16 respectively). I am also using a digital isolator to provide galvanic isolation between out power electronics and the port connected to the host PC. This is the first time I've built a system with USB onboard so I tried out the usb_ex1_dev_serial project in C2000WARE as a way to get started. However, this project seems to implement a more complex example on the generic controlcard, pushing data from the USB port in/out the SCIA port to the XDS110 part of the control card. My questions are:-

1) Is there a more simple code example which sets the native TMS320F28P650DK USB peripheral up as a CDC device which I can just push data out from my code to read in a terminal on the PC? A bit like what I do presently using an UART feeding an external UART/USB bridge chip but with USB coming natively from my processor.

2) Learning a bit more about how USB works is interesting. Do I need to monitor the VBUS +5V line from the connecting cable and then get my processor to issue some information over USB when it detects the VBUS is there and therefore the cable is connected? Is there an information source you can point me to which describes the sequence of events which need to occur for successful enumeration on the PC after the USB cable is plugged in (e.g. do I need extra application code on the C2000 or does the sysconfig setup with CDC device specified mean that the USB peripheral on my C2000 manages all of that automatically?)

Thanks,

Iain

  • Hi, 

    1) The example you are referring to is the only CDC example that we currently provide.  The SCI pins are connected to the e USB-to-UAR T adapter on the XDS110 emulator and redirects the traffic to and from the USB host system

    2) USB enumeration process involves the following steps, the drivers are already included in <C2000Ware>0\utilities\windows_drivers . 

    Best Regards

    Siddharth

  • Thanks for your message Siddarth. I'm getting up to speed with the libraries and the USB peripheral now. My understanding is that I still need to use an SCI peripheral (the buffers etc) to utilise the USB libraries. Is this correct? If so, can I use the SCI peripheral without actual using its RX and TX pins on the uC?

  • Hi, 

    No, it's not needed. 

    In this example,  USB-to-UAR T adapter on the XDS110 emulator is connected to the SCI pins of the device.  The USB to UART adapter gets listed as a COM port on the device.  Similarly when you operate USB in CDC mode, it creates a Virtual COM port. 

    When you send data from the PC, it is sent via the XDS to UART adapter to the SCI on the device. It receives this data and sends it back to the PC on the Virtual COM port of the USB. 

     Best Regards

    Siddharth

  • OK, thanks Siddarth. I think I need to study the USB peripheral and library functions more then to get a proper idea on how this all works. Thanks for your help.