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.

How to program the TM4C123GH6PM

I'm designing a board using the TM4C123GH6PMI. However, I'm having trouble figuring out how the board is actually programmed (downloading a binary file to run the controller). I've looked through the data-sheet and I can't seem to find anything to help me understand this. Also, I've been using the Evaluation Board schematic as a guide, and can see where they have the USB data lines going, but I don't know why they are going to the pins that they are, and how it actually programs. I will not have the ICDI to use that the evaluation board has.

Really, what I'm looking for is some documentation to get me started on understanding how the board is programmed via the USB, and which pins I need to put the data lines to. I have an elementary understanding of this at best, so the more details the better! It very well may be in the data sheet and I just missed it. Thanks!

  • Hello Austin,

    The TM4C devices have two methods to program

    1. JTAG/SWD which uses an IDE
    2. ROM Based Boot Loader which can take an image over serial ports like UART, USB, I2C and then program it to the device.

    The latter is more for production or OTA kind of operations. The first one is what you must be looking for. There are multiple vendors like TI, Segger, Keil which have Cortex M debuggers. The most cheapest and common that I have seen is the XDS100 which uses a 20-pin header with ARM connector. The following post will give u a good idea.

    e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/158121

    Regards
    Amit
  • Austin Riffle said:
    I'm designing a board using the TM4C123GH6PMI.

    Amit - what you wrote is of course technically correct - but might a bigger issue lurk?

    If such (common) JTAG-SWD knowledge is uncertain to poster - how likely is a, "self-designed board" to work?   And - should such an effort even be attempted - now?

    Instead - your eval kits, launch etc. make far more sense - and include ALL that poster (really) needs - while being explained/illustrated in great detail!

    Too often - falling into the "trap" of answering poster's (not really appropriate) question/issue - distracts from a greater issue.  Some diplomacy required - but such "steering" will likely produce happier poster - and less "wear/tear" upon you...

  • Hi Amit
    Thanks for the reply. I actually think the boot loader is closer to what I had in mind, as I already have a UART bus set up. However, I'm trying to look at through the data sheet to find which pins I need to be connected to, and which set of instructions to use to start the bootloader after reset. Thanks
    Austin
  • Hello Austin,

    Please be careful when using the boot loader. If the boot loader has a bug then probably the device will not be able to accept anything more than the first image. It is always "safe" to have JTAG. The JTAG pins are PC0-3 (data sheet contains which pin is TCK, TDI, TMS and TDO). The UART pins are PA0 and PA1 (RX and TX).

    Regards
    Amit
  • I see. Yes, I will include both UART0 (all pins) and have already included pins PC0-3 for JTAG as well. Regarding the Boot Loader, is there a default pin set for the boot configuration register? I see that you can program it to be whatever pin you want, and they give an example of it being PB7, but what is the default pin? Thanks for all your help so far.
  • Hello Austin,

    In the BOOTCFG register till the EN bit is not cleared, the ROM Boot Loader will not execute. So by default the register will not work with any GPIO.

    Regards
    Amit
  • Hi Amit,
    I've been trying to program this board using UART0 and the LM Flash programmer, but I've run into a few issues.

    First, it is my understanding that Boot Loader will execute the first time the board is turned on. I'm referencing this article: e2e.ti.com/.../337105 . Is this correct? I've read through the boot loader documentation but I couldn't find any confirmation on this. If this is not the case, how am I to go about starting the boot loader the very first time?

    Second, I'm attempting to generate the binary file using Code Composer Studio using the tiobj2bin resource, but am not seeing any outputted files generated. Here is a post I am using to guide me for this: e2e.ti.com/.../559825

    Third, does LM Flash programmer only accept binary output, or is there another format it excepts, as in the .out generated via CCS?

    Finally, I would just like to confirm that the process I am following to program the board for the first time is correct:
    1. connect UART0 via COM Port
    2. Open LM Flash Programmer
    3. Select binary file
    4. Select "Program" in LM Flash programmer - (any program offset needed in flash?)


    Thank you very much for your time, I'm trying my best to read all relevant documentation before coming here.