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.

TM4C123GH6ZRB: TI ROM Bootloader Enumeration Failures

Part Number: TM4C123GH6ZRB
Other Parts Discussed in Thread: LMFLASHPROGRAMMER

Hello,

I have recently started experiencing some programming failures when working with the TI bootloader loaded in ROM on the TM4C. We have experienced this issue on both the development launchpad board, and with the IC on one of our custom boards now. I should also add that it even fails when using LMFLASHPROGRAMMER from TI and returns an error code of -1.

Below is a log showing the device failing to enumerate:

[    5.614518] hub 1-1.3.2.1:1.0: USB hub found
[    5.619131] hub 1-1.3.2.1:1.0: 4 ports detected
[    5.666698] usb 1-1.3.4: new full-speed USB device number 9 using xhci-hcd
[    5.776725] usb 1-1.3.4: device descriptor read/64, error -32
[    5.996730] usb 1-1.3.4: device descriptor read/64, error -32
[    6.216706] usb 1-1.3.4: new full-speed USB device number 10 using xhci-hcd
[    6.326731] usb 1-1.3.4: device descriptor read/64, error -32
[    6.546731] usb 1-1.3.4: device descriptor read/64, error -32
[    6.766706] usb 1-1.3.4: new full-speed USB device number 11 using xhci-hcd
[    6.776148] usb 1-1.3.4: Device not responding to setup address.
[    6.999147] usb 1-1.3.4: Device not responding to setup address.
[    7.216704] usb 1-1.3.4: device not accepting address 11, error -71
[    7.316707] usb 1-1.3.4: new full-speed USB device number 12 using xhci-hcd
[    7.326148] usb 1-1.3.4: Device not responding to setup address.
[    7.549146] usb 1-1.3.4: Device not responding to setup address.
[    7.766705] usb 1-1.3.4: device not accepting address 12, error -71
[    7.773266] usb 1-1.3-port4: unable to enumerate USB device

The device that fails to respond to setup and does not accept the address is the TM4C, as the rest of the devices attached to the hub are functioning fine.

I am running on Linux, and have tried a variety of commands to force the device to try and enumerate again, but it seems to continuously get the above error.

    • Resetting the entire hub:
      echo 0 > /sys/bus/usb/drivers/usb/1-1/authorized
      echo 1 > /sys/bus/usb/drivers/usb/1-1/authorized
    • Narrowing down to specific ports:
      echo 0 > /sys/bus/usb/drivers/usb/1-1.3/authorized
      echo 1 > /sys/bus/usb/drivers/usb/1-1.3/authorized
    • Unbinding and rebinding USB and PCI drivers

      for i in /sys/bus/usb/drivers/*/*:*; do

      [ -e "$i" ] || continue
      echo "${i##*/}" > "${i%/*}/unbind"
      echo "${i##*/}" > "${i%/*}/bind"
    done
     
    for i in /sys/bus/pci/drivers/*/*:*; do
      [ -e "$i" ] || continue
      echo "${i##*/}" > "${i%/*}/unbind"
      echo "${i##*/}" > "${i%/*}/bind"
    done

Are there any known issues regarding this bootloader? Or potential fixes to get around this?

  • Hi,

      Are you trying to use the USB port as the bootload interface by calling ROM_UpdateUSB()?

    I have recently started experiencing some programming failures

    Is the problem sporadic meaning it sometimes works? How often does it fail? 

    Is it possible for you to try the LaunchPad and your custom board on a Windows host system? I just wanted to rule out if it is OS dependent. 

  • Hi,

    This is just with blank chips, so there is no contents in FLASH meaning that the TI Bootloader should just load from ROM at startup.

    The problem appears to be sporadic, with it happening ~10% of the time.

    We have not experienced this issue yet on a Windows machine but have done signficantly less testing on the Windows side. However, when using LMFLASHPROGRAMMER on Windows is when we experience the flash programming failure on the LaunchPad. This seems to happen usually at least once before a successful program, resulting in the -1 error at a random %:

  • Hi,

      I try to use the ROM bootloader to load a simple blinky program more than 10 times and I never have any issue. Before you see the error shown up on LM flash programmer, what did the Windows device manager show? Does it have proper enumeration? Please note that I connect the LaunchPad directly to the PC USB port. I don't use any USB hub. 

      As for linux, I really don't have much experience for that platform and don't have much to offer. Does it make a difference if you plug the LaunchPad directly to the host machine, not going through the hub?

  • Hi,

      Also a few words of caution. When the flash is erased, you will see two DFU devices in Windows device manager. The ROM bootloader will enumerate as the 'Stellaris Device Firmware Upgrade". However, there is also the "Stellaris ICDI DFU Device" that is enumerated by the on board ICDI debug probe. You must select the correct DFU device or otherwise, you will corrupt the wrong one. There are two USB ports on the LauchPad board. One is the Debug USB port and the other is the Device USB port. I suppose you want to download your code through the Device USB port. The Device USB port is where the ROM bootloader enumerates as the DFU device. 

    You can also also use the command-line dfuprog.exe located in C:\Program Files (x86)\Texas Instruments\Tiva\usb_examples\dfuprog.exe to download your program via USB with the ROM bootloader enumerating in DFU mode.