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.

RTOS/EK-TM4C1294XL: USB DFU Composite Device

Part Number: EK-TM4C1294XL

Tool/software: TI-RTOS

I have run the sample USB DFU program on the TM4C1294 Launchpad where the DFU upgrade mode is enetered via USR1 pushbutton and that works as it should.

I have then loaded and followed the instructions for the USB DFU composite device upgrade mode and I get as far as doing a dfuprog.exe -e command and seeing Device 0 listed as PID: 0x0102.

When I then enter the command dfuprog.exe -i 0 -m, I get the message "Switching device into DFU mode." but when I do another dfuprog.exe -e command, the response is "Found 0 devices"

In Device manager I see Tivaware Device Upgrade Firmware (runtime model) and under Universal Serial Bus controllers I see the USB Composite Device with VID:1CBE and PID:0102.

What could be wrong?  

Thnaks,

Sam

  • Hello Sam,

    Which OS are you using? Windows? If so, what version? Can you post a screenshot of your device manager?
  • Windows 10.  Just OTG USB connected to PC. 

    COM11 last event listed:

    Driver Management concluded the process to install driver usbser.inf_amd64_d49c1a9bc63fc04e\usbser.inf for Device Instance ID USB\VID_1CBE&PID_0102&MI_00\6&3382D9DC&0&0000 with the following status: 0x0.

    Tivaware Device Firmware Upgrade last event listed:

    Driver Management concluded the process to install driver usb_serial_dfu.inf_amd64_20ee184920bd438f\usb_serial_dfu.inf for Device Instance ID USB\VID_1CBE&PID_0102&MI_02\6&3382D9DC&0&0002 with the following status: 0x0.

  • Hello Sam,

    The TivaWare USB Composite example is not functional with Windows 10 due to the changes in USB enumeration brought about by the OS, so I would strongly suspect that the same issue is present with your USB DFU Composite.

    Unfortunately we don't have a fix for that currently (the issue is believed to be in the descriptors) as other higher priority items are ahead of it on the docket.

    Are there other USB DFU examples you can leverage in it's place?
  • So how do I tell my customer to update the firmware?
    I have tried Ethernet updating but that has been hit and miss.
  • Is this a hypothetical question to plan out firmware development, or do you mean literally there is a device in a customers hands and they want to upgrade?

    The DFU and push button application seems viable. I owned a router that required the reset button pressed during power on for special functionality.

  • The driver for the Tivaware Device Firmware Upgrade is 2.1.1.71 dated 12/15/15
    Is that a high enough version?
  • Hello Sam,

    I will try and run the DFU process on both Win 7 and Win 10 to compare if Win 10 is the source of the issue for the aforementioned problem, and also look into the firmware upgrade driver. I am not sure if an updated driver for DFU was released.

    The latest TM4C drivers can be downloaded from: software-dl.ti.com/.../SW-TM4C-2.1.4.178.PATCH-1.0.zip

    You can try using that if you want whilst awaiting my feedback.

    I am aiming to work this issue more tomorrow but it may get pushed into Friday.
  • I updated the driver for the USB to the version in the link and it ran the install but when I go to device mgr it shows a microsoft driver.  If I try to update it says best drivers already installed.

    Only the OTG USB of the board is connected to the PC.  I tried a reboot of the board but no joy.

  • I was able to force the TI drivers by selecting "Let me pick from a list" and "have disk" when updating the driver in device mgr.
    So now both are showing TI version 2.1.4.0. BUT still will not go into DFU mode when I do the command dfuprog.exe -i 0 -m
  • Hello Sam,

    Which example firmware do you have loaded onto the board specifically? Also can you try using LMFlash programmer and see what the results are?

    Using the TivaWare boot_serial example w/ LMFlash Programmer I can see the DFU option without issue.

    I am not familiar with the dfuprog.exe operations so I would need to look into that next week if needed, but most of our customers to my knowledge use LMFlash for this.

    Looking through examples, I don't see one which is for a composite device, can you share the example I should load onto my LaunchPad that would be for a composite device?

  • I imported the example using the resource explorer from:

    TI-RTOS for TivaC->Tiva C series->Tiva TM4C1294NCPNT->EK-TM4C1294XL Evaluation Kit->Driver Examples->TI Driver Examples->USB Examples->USB->Serial Device

    And then followed the directions in the document titled : USB Serial Device Firmware Upgrade (DFU) dated Jan 12, 2016 that I downloaded from the TI Wiki 

    http://processors.wiki.ti.com/index.php/TI-RTOS_USB_DFU 

    There are two versions, one that requires pressing the USR1 pushbutton to enter DFU mode and the other via a command.

    The first version works and even works with LM Flash Programmer 1613.  The command version does not work either by command prompt or LM Flash Programmer.

    Is there another example that I should try?

  • Hello Sam,

    Oh I see, since a lot of this was about TivaWare DFU I didn't realize that the example came from the TI-RTOS package (I am not highly familiar with that).

    I have not used that example myself, so I will give it a try tomorrow and see how it works on my end for both Win 7 & Win 10.

    If you need RTOS, I don't want to suggest another example as I don't know all the examples for TI-RTOS. The example I suggested for boot_serial is from our TivaWare examples that don't have RTOS.
  • I don't thinl RTOS has anything to do with it not working. I think it is a windows issue.

    I might check out the non RTOS version just as a test.

    Thanks
  • Of course the other possiblity is that I did something wrong in the code.
  • Hello Sam,

    That is possible too, I looked into the project details and it's a lot more involved than I expected so I am handing this over to the TI-RTOS team who should have more familiarity with the example project.
  • In part 6 of the dfu tutorial, you are instructed to import a project called usbserialdfu. This project's target config is set to erase flash starting at 0 (where your bootloader goes). Did you edit this? You can check if the memory is erased with the memory browser while in debug mode.

    I had a problem installing the drivers for this part. The error message says "The third party INF does not contain digital signature". I am reluctant to turn off signed driver enforcement for my current PC. Did you follow part 6 step B and encounter this error?
  • Hi Peter,

    Thanks for bringing that up, I am curious now if the TI-RTOS team can comment if the latest Tiva Patch drivers (which I linked earlier in the thread) may be needed to resolve that. If the example referred to our TivaWare drivers released with the TI-RTOS package, than I believe that may be the case as the PATCH drivers we released were largely to address signed driver issues w/ Windows so no one has to turn off the signed driver enforcement anymore.
  • Okay, so I set the new flash settings on the first example but NOT the second.

    I will let you know if that fixes it.

    Thanks

  • The instructions suggest the driver may not be included. The tutorial instructs the user to install two drivers from a normal TivaWare install directory. This last driver install is the only one included with the project download. It might be a one time special driver.

    I will try the patch.

    Update: the driver did not install with a different error message "Windows could not find drivers for your device."

  • project map file:

    OUTPUT FILE NAME:   <usbserialdfu.out>

    ENTRY POINT SYMBOL: "_c_int00"  address: 000099e9

    MEMORY CONFIGURATION

            name            origin    length      used     unused   attr    fill

    ----------------------  --------  ---------  --------  --------  ----  --------

     FLASH                 00004000   000fc000  00009bd0  000f2430  R  X

     SRAM                  20000000   00040000  00002048  0003dfb8  RW X

    Device Mgr

    Still no joy.

    Sam

  • Sam,

    I'm just coming up to speed on this thread. I would like to confirm the fundamental issue. From what I've read, it seems that you are working on Windows 10. In this environment, when you use the command dfuprog to transition the Tiva board from runtime mode into DFU mode, it fails to do so. The device is in some unknown state and fails to enumerate properly. Have I got this correct?

    In addition, Ralph has indicated that the composite device support in the USB stack is currently non-functional on Windows 10 due to some changes in USB enumeration. Bummer.

    Finally, are you looking for the composite feature because the device does not have buttons?

    Thanks,
    ~Ramsey

  • Yes, Windoz 10.

    Was trying to avoid having to add a button to the device but not a deal breaker.

    The button version works well so I might work around that one.

    Thanks,

    Sam

  • I turn off signed drivers and I see the same error as Sam after giving the dfuprog -m command.

    The vendor ID appears to have changed.

  • Sam,

    To pursue this a little further. Building a composite device is not the only option.

    I don't know what your device does when its connected to a PC, but I assume it would be communicating with some software entity. If you have control over this, then your software entity could send a command to the device (using its primary interface) to enter DFU mode. The device would reboot and be ready for upgrade.

    The composite device example was just an illustration of how to enter DFU mode using a separate interface. But if you have control of the primary interface, then maybe you could use that interface for both runtime mode and DFU control.

    ~Ramsey

  • Sam,

    In case you want to pursue the single interface approach, I'm attaching a file which contains a function for switching from USB run-time mode to USB DFU mode.

    DFU_sample_code.zip

    There are several steps required to switch from USB run-time mode to USB DFU mode. This includes terminating the current USB interface and detaching from the USB bus. Followed by a few hardware details regarding interrupts, resetting the USB controller, and PLL frequency programming. Last step is to connect to the USB bus again and re-enumerate as a USB DFU device. The sample code performs these steps with the help of the ROM code on the TM4C1294 device.

    When your application decides to switch from run-time mode to DFU mode, shutdown application services as needed, then call the DFU_renumerate() function.

    ~Ramsey

  • Thanks.  Sorry for the long gap in reply, was out of town on personal matters.

    Sounds like a lot of juggling and steps that could go wrong in the field.

    Being that the hardware (pushbutton) solution seems reliable, I think I might just build a hardware slution such as an on board circuit that is activated from the touch screen to put the board in DFU mode.

    Sam

  • Sam,

    Understood. Using a button is probably a wise decision. Best of luck.

    ~Ramsey

  • Sam,

    Can I mark this as resolved?

    Todd