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.

EK-TM4C1294XL: Debugger firmware

Expert 1570 points
Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: TM4C123GH6PM, TM4C1294NCPDT, EK-TM4C123GXL

We have developed a custom board that uses the majority of the design on the EK-TM4C1294XL eval board, and we need to program the debugger chip (TM4C123GH6PM) so the main chip (TM4C1294NCPDTI3R) can be programmed through the USB port.  I haven't been able to find a binary for this chip.  Any help finding this?

Thanks,

Angelo

  • If the TM4C123GH6PM is still blank, you can use LM Flash Programmer to program the Stellaris ICDI firmware. Configure LM Flash Programmer to Manual Configuration and then select USB DFU. Connect the PC to the TM4C123 USB connector.

    Then on the "Other Utilities" tab select the ICDI Firmware "Update" button. It will give you a warning that the device is not a an ICDI (because it does not have an existing version of the firmware in it).  It will ask if you want to rewrite and update this device. Select "Yes".

  • Greetings Bob,

    I may be (again) confused - may we ask if this (apparent ability to 'access ICDI code') represents a 'new' (or change) in vendor policy?    Many times - somewhat similar requests (btw - made of ALL ARM MCU vendors) yields a, "Sorry - such is not made available."    Kindly note ... I'm asking 'for a friend'...

    You specifically noted, "If the TM4C123GH6PM is still blank" - would this method succeed if a '123 device had been programmed - yet has been subsequently erased & reset/restored to, 'blank' status?

    Thanks your time/attention - and if possible - kindly comment upon the 'ICDI code' issue...

  • Hi cb1,

    cb1_mobile said:
    I may be (again) confused - may we ask if this (apparent ability to 'access ICDI code') represents a 'new' (or change) in vendor policy?    Many times - somewhat similar requests (btw - made of ALL ARM MCU vendors) yields a, "Sorry - such is not made available."    Kindly note ... I'm asking 'for a friend'...

    We do not provide the SOURCE, but the BINARY can be flashed via the above method. Requests for the SOURCE code for the ICDI in order to edit/modify it is what we deny.

    cb1_mobile said:
    You specifically noted, "If the TM4C123GH6PM is still blank" - would this method succeed if a '123 device had been programmed - yet has been subsequently erased & reset/restored to, 'blank' status?

    Yes, if the Flash has been fully erased, this method would work.

  • Hi Ralph,

    Aha - now clear - both 'a friend' & I thank you...

  • Thanks for your reply Bob, very helpful.  This does work on the TI dev board, however when trying on the custom board we are not seeing the device in LM Flash Programmer.  I suspect it is due to a hardware issue on the new board.  We used a USB-C connector instead of the micro-USB connector on the dev board, although I don't think that's the problem.  I'm working on comparing the new design to make sure I didn't do something wrong.

  • Hello AQ,

    From what I can see you need to take a few steps to make a USB Type-C connector compatible with USB 2.0 which is what the TM4C USB peripheral supports (specifically it supports 2.0 full speed from a hardware level, 2.0 high speed requires an external USB PHY).

    Have a look at this article and see if you need to make hardware modifications: https://www.synopsys.com/designware-ip/technical-bulletin/converting-existing-designs.html

  • I'm still not able to see the ICDI interface appear in the device manager.  I replaced the USB-C connector with micro-USB, wired as done on the TI eval board, and it didn't help.  I checked over the design in comparison to the eval board and don't see any errors. 

    Is there a document somewhere that describes the hardware requirements for a device to start up in ICDI mode for USB DFU?  I see three pull-down resistors on the eval board with notes about how to configure the operating mode, and I have the same resistor options on the custom board with those removed, but still no luck.  I'm wondering if there are any other special pin conditions that need to be satisfied to make this work.

    Thanks,

    Angelo

  • Hello AQ,

    We don't provide any documentation to re-make the ICDI circuit... the original idea of the ICDI was to make an evaluation kit without the need of a proper hardware debugger like XDS200/J-Link etc. to save cost for initial development. It has never been meant to be used for production hardware, though on occasion customers do try and do this. So while we don't block you from trying this, we also are not supporting it. Furthermore, it was not developed by our team so even if we wanted, we don't have the technical background on it's design to help answer such questions.

    In general the ICDI interface won't show up at all until the TM4C123x is flashed as Bob outlined, and to do that, you would first need to see the device show up as a TivaWare Device Firmware Upgrade device in your Device Manager. There is no 'ICDI Mode' for USB DFU. Those are separate.

  • Thanks Ralph, so what is the recommended design for developing boards that require USB DFU capability?  My understanding is that I can't program the TM4C1294XL directly with the LM Flash programmer (or something similar), is that right?

    Thanks

  • Hello AQ,

    If you have a blank device like TM4C1294NCPDT with a properly designed USB interface, then it is possible to use USB DFU to program it. All TM4C devices include a ROM Boot Loader. If the part has a USB peripheral, the ROM Boot Loader will allow a blank device to show up as a USB DFU as USB is one of the supported ROM Boot Loader interfaces. You can then program the device with LM Flash Programmer or the USB DFU utility we provide. So you can directly program your device with USB DFU as long as the USB interface is working properly.

    The ICDI isn't just a program loader though, it also is a debugger. If you need debug capability, then you'd want to look into JTAG probes such as those listed here: http://www.ti.com/lit/an/spma075/spma075.pdf

  • OK thanks for clarifying.  I thought it should be possible, but we saw somewhere it wasn't.  It makes sense, because when I connect to the USB port of the TM4C1294 chip, the device does show up in LM Flash programmer, but I wasn't able to program it.  Since you say it should be possible, I'll keep troubleshooting this.  Are there any hardware requirements on the chip (e.g. pin states on boot-up, etc.) I need to check for?

    We don't need debugging capability on the board for production units.  I would be nice to have it, but we can use the eval board or add a JTAG interface to the chip and do it that way instead.  If we can figure out how to program the TM4C1294 directly via USB (we don't have any other programming interface except the ICDI chip) we would be in good shape.  I would still love to find the cause of the ICDI chip not being seen though.

  • Hello AQ,

    AQ said:
    It makes sense, because when I connect to the USB port of the TM4C1294 chip, the device does show up in LM Flash programmer, but I wasn't able to program it.

    How does it show up, and how are you attempting to program it? Maybe I can give some guidance on the right steps.

    AQ said:
    I would be nice to have it, but we can use the eval board or add a JTAG interface to the chip and do it that way instead.

    Would not be bad to have the routing and headers in place for JTAG even if not populated!

  • Ralph Jacobi said:
    Would not be bad to have the routing and headers in place for JTAG even if not populated!

    Agreed!   Extremely useful - has proven such repeatedly!

    Providing the trace routings as well as component (pull-up/down Rs) & header 'Pcb Footprints' enables 'selective' filling.   (i.e. fill as/if needed...)

  • Thanks for your support Ralph and quick response.  If I connect the eval board through the TM4C1294 chip USB port and change the power jumper, I don't see any device appear in LM Flash programmer.  This is even after erasing the chip through the ICDI interface (which does work).

    On the custom board, when connecting to that USB port, a device appears in LM FP, called "Tiva Device Firmware Update".  If I try to program a bin file I get "An error occurred during USB download!".  If I try to erase the chip I get Error -3: DFU_ERR_NOT_FOUND. Blank check gives Error -4: DFU_ERR_UNKNOWN.

    Since this chip also had the UBS port changed from micro to USB-C, I'm concerned the absence of the ID pin may be the cause.  Is the chip in host or peripheral mode when in DFU?  Should I ground the ID pin connection (PB0)?

  • Thinking about it some more, that ROM bootloader may not help much if it only works on blank chips.  We would still be left with a board that can't be updated via USB without the ICDI chip on-board.  Is that correct that once there is something loaded in the TM4C Flash that the USB ROM bootloader can't be invoked again?

  • Hello AQ,

    For the LaunchPad

    Did the blank check clear? How are you looking for the device in LM Flash? Do you see a Tiva Device Firmware Upgrade device in your Control Panel -> Device Manager?

    When I do what you outlined:

    AQ said:
      If I connect the eval board through the TM4C1294 chip USB port and change the power jumper,

    I get this:

    For your Custom Board

    AQ said:
    Since this chip also had the UBS port changed from micro to USB-C, I'm concerned the absence of the ID pin may be the cause.  Is the chip in host or peripheral mode when in DFU?  Should I ground the ID pin connection (PB0)?

    It will be in device mode.

    AQ said:
    On the custom board, when connecting to that USB port, a device appears in LM FP, called "Tiva Device Firmware Update".  If I try to program a bin file I get "An error occurred during USB download!".  If I try to erase the chip I get Error -3: DFU_ERR_NOT_FOUND. Blank check gives Error -4: DFU_ERR_UNKNOWN.

    I think I know what is happening with your custom board now that you posted those errors.

    This sounds like Item 4 on our common problem thread: https://e2e.ti.com/support/microcontrollers/other/f/908/t/755561

    4) ROM boot loader is not working on custom TM4C129x board 

    Issue: Trying to invoke the ROM boot loader does not work as expected even with identical software being used from evaluating on EK-TM4C1294XL LaunchPad

    Likely Root Cause: Errata Item ETH#03: http://www.ti.com/lit/spmz850

    Solution: As per the data sheet the acceptable practice for Ethernet PHY enabled parts is a no connect (NC) to the RBIAS pin if on-chip PHY is not used. However the ROM Boot Loaders enable the Ethernet PHY when the Flash is erased for Ethernet PHY parts which causes the ROM Boot Loader to fail. Also if a 25MHz crystal is used without RBIAS resistor, then JTAG may not work.

    A RBIAS resistor is required even if the application does not require the Ethernet PHY. In this case, a 4.7KOhm 10% tolerance resistor can be used in place of 4.87KOhm 1% tolerance resistor between the RBIAS pin and GND.

    AQ said:
    Is that correct that once there is something loaded in the TM4C Flash that the USB ROM bootloader can't be invoked again?

    You can invoke the ROM Boot Loader again via two means:

    1) Have your application call the ROM_UpdateUSB(0); API.

    2) Use BOOTCFG register to set a GPIO and level that can be asserted, see the BOOTCFG section in your device datasheet for more details about this option.

  • For the launchpad:  Yes that's what I get, and in the Device Manager I see "Stellaris Device Firmware Upgrade", but I can't load a binary after that.

    For the custom board:  This board also uses the Ethernet and has the bias resistor installed.

    I was able to connect to both chips on the board through the JTAG connector (I forgot it is tied to both devices before).  I'm able to load a binary into the TM4C1294, but I don't have anything to load into the ICDI chip.  I don't suppose that firmware is available as a binary anywhere?  I thought maybe the LM Flash programmer software could update the ICDI firmware through the JTAG interface but that doesn't appear to be the case.

  • Hello AQ,

    AQ said:
    For the launchpad:  Yes that's what I get, and in the Device Manager I see "Stellaris Device Firmware Upgrade", but I can't load a binary after that.

    What error is reported with the LaunchPad when that happens?

    AQ said:
    For the custom board:  This board also uses the Ethernet and has the bias resistor installed.

    Can you try using the dfuprog program from TivaWare - it is located in the tools\dfuprog folder. You'd need to build the Visual Studio project as that is one of the tools without a executable included already. Once you have it built, run Command Prompt from the debug folder. The dfuprog utility can be used to setup a DFU device but also get information about one and that info may help here:

    //! With the device connected to your PC and the device driver installed, enter
    //! the following command to enumerate DFU devices:
    //!
    //! <tt>dfuprog -e</tt>
    //!
    //! This will list all DFU-capable devices found and you should see that you
    //! have one or two devices available which are in ``Runtime'' mode.
    

    AQ said:
    I'm able to load a binary into the TM4C1294, but I don't have anything to load into the ICDI chip.  I don't suppose that firmware is available as a binary anywhere?

    I do not recall of this being ever provided, but if it has been for some reason, you might be able to find it by searching E2E. I didn't see it anywhere in my searching, just multiple mentions that the binary is not provided.

  • Early morning (possibly too early) greetings,

    Ralph Jacobi said:
    just multiple mentions that the binary is not provided.

    That would be the Source Code (which is withheld) - as you've earlier well noted...

  • Not sure if this will work, but it should. I Used an EK-TM4C123GXL launchpad and connected to the ICDI port to erase the application device. Then I connected to the application device USB port and used LM Flash programmer to program the Stellaris ICDI firmware into the application device. I power cycled then verified that I saw the Stellaris ICDI in device manager. Then i went back to the ICDI USB port and used LM Flash programmer to upload a .bin file. I collected the entire 256KB of flash, but it looks like code only exists in the first 64KB. Here is that .bin file. You can try to program this .bin file into the TM4C123 device that will be the ICDI device on your custom board using the JTAG conncection.

     /cfs-file/__key/communityserver-discussions-components-files/908/StellarisICDI.bin

  • Re the launchpad - sorry I confused myself, no I didn't see the Tiva... device appear in tLM Flash programmer on the lanuchpad when connecting to the target USB port after erasing the chip.  I'll try again to confirm.

    I'll look into building and trying the dfuprog.

  • Hello AQ,

    FYI if you see Stellaris Device Firmware Upgrade in the Device Manager, that is what will show up in LM Flash Programmer as well. It doesn't HAVE to be "TivaWare". Just depends on what drivers were installed I think.

  • Good thinking Ben, thanks, that was helpful.

  • I found the problem - the crystal used on the board was the wrong frequency.  Replaced it and it's all working normally now.  That's embarrassing, but I'm glad we finally figured it out and that there appear to be no other issues with the board.

    Thanks Ralph and Bob, and everyone else that replied.