Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

CCS/LAUNCHXL-F28379D: Implement a USB device (peripheral) in LAUNCHXL-F28379D

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi everyone, 

I am trying to use the LAUNCHXL-F28379D as a USB peripheral, i.e. the PC will be the host just asking some data to the device (Launchpad).  Some doubts I would like to share with you before starting:

- USB0DM is  in GPIO42 and USB0DP is in GPIO43, in the launchpad these pins are physically connected to the isolators to the FTDI, since the GPIOs are typically used as the SCIATX and SCIARX. I have thought to lift the isolators legs to  disconnect the pads from the isolators and connect to the pads two wires coming from an external USB cable for USB0DP and USB0DN. In this way SCIA is not connected anymore to the FTDI, Would it be any problem/restriction for loading the program and debugging? What about USB0PELT and USB0EPEN? are really needed?

-I am following the example from the C2000Ware called usb_dev_serial, is it the closer to my goal? is there any help or extended documentation about this example?

Best regards 

  • Hi,

    You should be able to download the program after disconnecting the GPIOs as mentioned.

    However , you may not be able to run the "usb_dev_serial" example after this change since it uses SCIA to redirect SCIA traffic to and from the USB host system.

    Best Regards

    Siddharth

  • Hi Siddharth, 

    I have just moved to the usb_dev_bulk example, that seems the easiest one. You are right the usb examples use the SCIA for debugging through a virtual serial port. I have just modified the example to use SCIB, so the lifted pins from the isolators now go to GPIO19 (SCIBRX) and GPIO18 (SCIBTX). After downloading the program (CPU1-FLASH), the debugging through the virtual serial port is working with SCIB, i.e. I can open a terminal a see the messages. 

    I have now to connect GPIO42 and GPIO43 (pads under the lifted isolator pins) to USB0DM and USB0DP in the external USB cable (and GND of course), to really test the USB connection. Do you know if I will need also to wire the rest of GPIOs enabled for USB in the example?:

    GpioCtrlRegs.GPBDIR.bit.GPIO46 = 0;  //VBUS
        
     GpioCtrlRegs.GPBDIR.bit.GPIO47 = 0;  //ID
        
    GpioCtrlRegs.GPDGMUX2.bit.GPIO120 = 3;//USB0PELT
    GpioCtrlRegs.GPDMUX2.bit.GPIO120 = 3;
    GpioCtrlRegs.GPDGMUX2.bit.GPIO121 = 3;//USB0EPEN
    GpioCtrlRegs.GPDMUX2.bit.GPIO121 = 3;

    I am not sure if they are needed, since the USB mode is  eUSBModeForceDevice, and it is supposed that VBUS and ID are not used or monitored. 

    Best regards and thanks for you help

  • Hi, 

    I have connected the USB cables wires to the evaluation board:

    - GND (black) to GND pin in evaluation board.

    - USB0DM (white) to GPIO42

    - USB0DP (green) to GPIO43

    - VDD (red) to GPIO67 through a 100k resistor. 

    In the usb_dev_bulk example as described in previous post, I changed SCIA by SCIB and GPIO46 to GPIO 67 (for the VBUS line, just in case). 

    In the virtual com port I can see the message continuos reception "C2000 F2837x Series USB bulk device example", however it is detected at 57600 baud rate (I am using RealTerm Serial capture program). 

    however when I connect the USB cable to the laptop, it is not detected in the Device Manager, and when I open usb_bulk_example in "C:\ti\c2000\C2000Ware_3_02_00_00\utilities\tools\f2837xd\usb_bulk_example\Release"

    The app opens but give error 1167 as if the TI Bulk USB device is not initialized. 

    Could it be because the wrong baud rate, 57600 inestead of 115200?

    Why could be the reason of having a wrong baud rate? I did not modified the baud rate in the CCS project. 

    Best regards

  • I have solved the problem with the baud rate, _LAUNCHXL_F28379D must be added to symbols on the properties, to the UART configuration to set the right SYSTEM_CLOCK_SPEED (see line 71 in sysctl.h file. 

    Now the baud rate from SCIB (and in the serial monitor terminal) is the right one 115200. 

    However the error 1167 is still present when running usb_bulk_example app. 

    Best regards 

  • Well, some advances (or not):

    - When removing DEBUG option (remove DEBUG from symbols) and load the program in the evaluation board, the communication to the virtual serial port (SCIB monitoring) is interrupted but windows now detects a new Unknown USB device (Device Descriptor Request Failed) when I connect the external USB cable (one connected to the USB controller in the Launchpad). 

    I have tried to update the driver using the ones in C:\ti\c2000\C2000Ware_3_02_00_00\utilities\windows_drivers.  but I received a message error saying that there is no compatible driver with my device. 

    Any ideas?

    Best regards

  • Hello, 

    I am still blocked with the windows driver. windows 10 is able to recognise the USB0 controller in F28379D as a new  Unknown USB device, but I cannot update the driver. As described in previous post I am using the latest one from C2000Ware_3_02_00. 

    Even I have tried to disable signature for drivers : www.technipages.com/enable-disable-device-driver-signing  (Method 1 was protected by Security Boot options but I managed to disabled then with Method 2), which solved the problem in this post:

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/619710?keyMatch=C2000%20USB%20WINDRIVERS&tisearch=Search-EN-everything 

    But In my case the TIUSB driver is not recognised yet. When I try to update the driver with the folder C:\ti\c2000\C2000Ware_3_02_00_00\utilities\windows_drivers the answer is that the best driver is the one I have already (the unknwon USB device) and when I try to select directly the file usb_dev_bulk.inf I got this answer:

    "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems."

    Are the TIUSBdrivers ready for x64-based windows 10? I guess they must be, any ideas?

    Best regards 

  • Hello,

    The TI USB drivers do support x64-based Windows 10. What is the VID & PID that you are seeing for the detected device? Did you try to uninstall the driver and re-install the driver again?

    Best Regards

    Siddharth

  • Hi Siddhart, 

    Thanks for your reply. Maybe you are in the right direction, maybe it is not the driver itself, but a failure in the identification. When I connect the new USB cable (from the USB0 on board) windows detects a new USB Serial Bus controller, but as "Unknown USB Device (Device Descriptor Request Failed)" .

    On properties I cannot see much details about the device, on Driver Details it find "No driver are required or have been loaded for this device". However, on Events I can see 3 events after connecting it to the PC:

    Device not migrated: 

    Device USB\VID_0000&PID_0002\6&17794b01&0&4 was not migrated due to partial or ambiguous match.

    Last Device Instance Id: USB\VID_0951&PID_1603\0000000022
    Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
    Location Path:
    Migration Rank: 0xF000FFFFFFFFF032
    Present: false
    Status: 0xC0000719

    Device configure (usb.inf):

    Device USB\VID_0000&PID_0002\6&17794b01&0&4 was configured.

    Driver Name: usb.inf
    Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
    Driver Date: 06/21/2006
    Driver Version: 10.0.18362.693
    Driver Provider: Microsoft
    Driver Section: BADDEVICE.Dev.NT
    Driver Rank: 0xFF0000
    Matching Device Id: USB\DEVICE_DESCRIPTOR_FAILURE
    Outranked Drivers: usb.inf:USB\DEVICE_DESCRIPTOR_FAILURE:00FF2000
    Device Updated: false
    Parent Device: USB\VID_05E3&PID_0608\5&1fc31fa8&0&2

    Device not started:

    Device USB\VID_0000&PID_0002\6&17794b01&0&4 had a problem starting.

    Driver Name: usb.inf
    Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
    Service:
    Lower Filters:
    Upper Filters:
    Problem: 0x2B
    Problem Status: 0x0

    I cannot see the defined USB_VID_TI_1CBE (0x1cbe), or the USB_PID_BULK (0x0003) in the CCS project, anywhere. So it must be something related with this. The ID GPIO is needed? I am not using it, I am connecting:

    - GPIO42 to USB0DM (white cable)

    - GPIO43 to USB0DP (green cable)

    - GND (black cable)

    - GPIO67, configured as output to the red cable through a resistors of 110k. 

    The ID is configured in GPIO47 (like in the example), but I have not connected it to anywhere, should I? where?. 

    Best regards and thanks again for your help. 

  • Hi again, 

    Still I have the problem recognising the USB, windows detects the USB0 controller but as Unknown USB device  "Device descriptor Request Failed". 

    I have tested a USB_bulk example with the TIVA launchpad "EK-TM4C123XL" using the TIVA libraries and the Stellaris USB windows application, it works perfectly. From this example I have checked that for usb_bulk_device only USBDM, USBDP and GND need to be connected to the USB cable. 

    Coming back to TMS320F8279D launchpad, I have updated the example and libraries to the latest C2000 Ware "C2000Ware_3_02_00_00" and load the example to the launchpad. Just after running it detects the new USB, but even updating the drivers from "C:\ti\c2000\C2000Ware_3_02_00_00\utilities\windows_drivers" the result is the same, "Device descriptor Request Failed". 

    I can see in the CCS example that the VID is defined as 0x1CBE. and the PID for bulk device is 0x0003. Is it the same in the windows USB drivers? How I can check it?

    Best regards

  • I am inspecting the usb_dev_bulk.inf provided in the utilities/windows_drivers for the TIVA launchpad "EK-TM4C123XL" and for C2000 Ware "C2000Ware_3_02_00_00". They are identical. Also the use of of usb_bulk_structs.c in the CCS examples are identical. 

    How it is possible that one hardware (TIVA) is detected and not the other one? Apart from free and using the right pins GPIO42 and GPIO43 for USBDM and USBDP (hardware changes) , is there any change to make in the software or target configuration for the F28379D? 

    Has someone experience something similar?

    Best regards 

  • Hi ,

    I am still puzzled as to why it is not recognizing the device. 

    Request you to take a look at the driver setup log file "setupapi.dev.log" located in in the Windows INF file directory (%SystemRoot%\inf) and check if it flags any error.

    Best Regards

    Siddharth

  • Hi Siddharth, 

    The following is what the driver setup log file recorded after detecting the Unknown USB device and I tried to update the driver to the one provided in C2000 Ware. 

    >>> [Device Install (DiShowUpdateDevice) - USB\VID_0000&PID_0002\6&17794B01&0&1]
    >>> Section start 2020/09/18 19:33:22.024
    cmd: "C:\WINDOWS\system32\mmc.exe" C:\WINDOWS\system32\devmgmt.msc
    dvi: {DIF_UPDATEDRIVER_UI} 19:33:22.024
    dvi: Default installer: Enter 19:33:22.024
    dvi: Default installer: Exit
    dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 19:33:22.034
    ndv: {Update Driver Software Wizard - USB\VID_0000&PID_0002\6&17794B01&0&1}
    ndv: Search options: 0x00000011
    ndv: Searching currently installed INF
    dvi: {Build Driver List} 19:33:27.203
    dvi: Searching for hardware ID(s):
    dvi: usb\device_descriptor_failure
    dvi: Searching for compatible ID(s):
    dvi: usb\device_descriptor_failure
    dvi: Created Driver Node:
    dvi: HardwareID - USB\DEVICE_DESCRIPTOR_FAILURE
    dvi: InfName - C:\WINDOWS\System32\DriverStore\FileRepository\usb.inf_amd64_cdeeae6bb013a19f\usb.inf
    dvi: DevDesc - Unknown USB Device (Device Descriptor Request Failed)
    dvi: Section - BADDEVICE.Dev.NT
    dvi: Rank - 0x00ff0000
    dvi: Signer Score - INBOX
    dvi: DrvDate - 06/21/2006
    dvi: Version - 10.0.18362.693
    dvi: {Build Driver List - exit(0x00000000)} 19:33:27.283
    ndv: Recursively searching directory 'C:\TI\C2000WARE_1_00_04_00_SOFTWARE\UTILITIES\WINDOWS_DRIVERS'
    dvi: {Build Driver List} 19:33:27.293
    dvi: Searching for hardware ID(s):
    dvi: usb\device_descriptor_failure
    dvi: Searching for compatible ID(s):
    dvi: usb\device_descriptor_failure
    dvi: {Build Driver List - exit(0x00000000)} 19:33:27.353
    dvi: {DIF_SELECTBESTCOMPATDRV} 19:33:27.353
    dvi: Default installer: Enter 19:33:27.353
    dvi: {Select Best Driver}
    dvi: Class GUID of device changed to: {36fc9e60-c465-11cf-8056-444553540000}.
    dvi: Selected Driver:
    dvi: Description - Unknown USB Device (Device Descriptor Request Failed)
    dvi: InfFile - c:\windows\system32\driverstore\filerepository\usb.inf_amd64_cdeeae6bb013a19f\usb.inf
    dvi: Section - BADDEVICE.Dev
    dvi: {Select Best Driver - exit(0x00000000)}
    dvi: Default installer: Exit
    dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 19:33:27.363
    ndv: {Update Driver Software Wizard exit(00000000)}
    <<< Section end 2020/09/18 19:33:32.643
    <<< [Exit status: SUCCESS]

  • Hello everyone, 

    I continue trying to solve the problem of the F28379D Launchpad running the usb_dev_bulk example. One think I have noticed is that when I load the program (building FLASH option) into the Launchpad, there is no error and I can run it from the Debugger. When I press run button the new USB is detected by windows 10, (Unknown USB device  "Device descriptor Request Failed"). I press terminate button, and then I tried to run the program in Stand Alone mode ( in theory it must be save in FLASH). 

    For running it in StandAlone mode I Set switch 3 in S1 Boot to DOWN and I power off/on the board. I was expecting that running in StandAlone, the new USB will be detected by windows after power on (similarly to what happens during debugging after pressing run), but it is not.

    Could it be some kind of conflict with CPU02? 

    Sorry about the long thread, but I am totally lost about this error. 

    Best regards  

  • Hi

    During my frustrating solution searching, I have taken some screenshots of D+ and D- signals between the TIVA launchpad and the pc:

      

    And also between the Launchpad F28379D and the PC:

    As you can see the both board send signals that are detected by the picoscope as USB Full speed (12Mbit/s). However, while the TIVA is recognised as a Tiva Ware Devices (Generic Bulk device) immediately, the Launchpad F28379D is just recognized as Unknow Device and of course after some package the communication is stopped. In the TIVA pc connection I can see they keep sending packages every ms. 

    Any suggestion, how to continue?

    Best regards 

  • Hi everyone again, 

    I have tried to use the usb_bulk_device example from the latest C2000Ware version. It is contained in "C:\ti\c2000\C2000Ware_3_02_00_00\driverlib\f2837xd\examples\cpu1\usb" and named as "usb_ex4_bulk". This example version is a little bit different from previous, at least in organization, while the usb library seems to be used in the same way. One think very different from previous versions is that it includes specific .cmd files for the example:

    -2837xD_RAM_lnk_cpu1_USB.cmd

    -2837xD_FLASH_lnk_cpu1_USB.cmd

    As always I configure SCIB instead of SCIA since in the Launchpad SCIA pins are share with USBDM and USBDP. I lift up the SciRX and SCITX pins in the isolators and connect them to GPIO19 and GPI18 (SCIB), hence freeing GPIO42 and GPIO43 for the D- and D+ cables. 

    I can load the program, see the SCIB message in the FTDI assigned virtual com port, the new USB device is detected but as Unknow device and also I can see there is some initial communication in D+ and D-, but still the device is not Unknown (Descriptor failed). 

    I have checked from the debug session that the USB device is well initialized, at least VID and PID fields in the struct g_sBulkDevice are 0x1CDE and 0x0003.  

    I suspect that the problem maybe could be during the loading of the program. I am not able to run the example in Stand-Alone mode, i.e. after loading the program in FLASH build and terminate, disconnect the board from the supply, set switch 3 to down in S1 and power on again. I was expecting that the example should run as I do in debug session, receiving the SCIB message and present the USB device in the bus. But it is not.  

    Any suggestion? Is the example ready to be run Stand-alone? Could it be because the changing from SCIA to SCIB?

    Best regards 

  • Hi, 

    I have managed to run the example in Stand-Alone, I forgot to disable the watchdog in F2837xD_CodeStartBranch.asm. I think the  watchdog was disabled in the debug session but not when running during Stand-Alone. Once the watchdog is disable the example can Run in Stand-alone Mode (after power off/on the board). 

    Curiously the switch 3 in S1 has not effect, and the example can start in Stand-Alone Mode (with Switch 3 in S1 either UP or DOWN). 

    However, running the example in Stand-alone did not solve the original problem of windows detecting the USB controller as Unknown USB device (Device descriptor requested fail).

    From this point, I wonder if the  F2837xD_CodeStartBranch.asm or the 2837xD_FLASH_Ink_cpu1_USB.cmd files could have something to do with the problem. 

    Best regards 

  • Hi again, 

    I continue with the debugging of the usb_bulk_device in the Launchpad F28379D. Once new thing I noticed during the debugging session, watching the expression g_eCurrentUSBMode which I thought i should be at eUSBModeForceDevice but it is fixed at eUSBModeDevice. 

    My first question is if this normal. 

    After that I tried to readdress the VBUS pin to GPIO67 and ID pin to GPIO111,both interrupt-capable. An connect the GPIO67 (J1-5 in the launchpad) to VBUS line from the USB cable through a 100k resistor and GPIO111 (ID) to GND. However I just modified the re-addressing ing the USBGPIOEnable() function (line 553 of the example), and I am not sure how the USB controller can recognized this change. Here is my second question, how the USB driver can detect these pin changes? if VBUS input is monitored through and interrupt, where I have to define which is this new pin?

    Best regards  

  • Hi 

    I have managed to have access in the back connector J9 of the Launchpad F28379D to pins GPIO46 and GPIO47 (original pins in the examples for VBUS and ID).  I have connected them to VBUS in the USB cable through a 100k resistor and to GND respectively. Just in case the example need them, although in theory they are not monitored in ForceDevice mode. The problem is still there (Unknown USB device). 

    I have also tested in another laptop with windows 8, but the same problem. 

    Is there any way to debug the USB packages? I can see D+ and D- lines in the oscilloscope. I set the oscilloscope to be triggered by D+ (first rise edge), and I am comparing the signals in the TIVA launchpad for the usb_dev_bulk example. This example is properly recognised as Generic Bulk Device, the screenshoot of the first second of communication.

    And now the same procedure for the Launchpad F28379D:

    I can see some differences, but I don't know how to interpret them.  Is there any help document or guide where I can find these sequences?

    Is there any differences in hardware? The examples should work for any board with the F28379D, what about the F28379D based control CARD? Is there any hardware difference, e.g. some external pull-up/down resistors in D+ and D-?

    Also I have tested almost all the usb device examples, having the same result. 

    Best regards