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.

TM4C123GH6PM: How to upload a target TM4C123G microcontroller through UART

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: LMFLASHPROGRAMMER, EK-TM4C123GXL

Hello,

I am struggling to understand how to upload a custom board that comes with a TM4C123G MCU. I would like to upload the code through its serial port (UART0).

I am using LM Flash Programmer and a Tiva Evaluation Launchpad to load the code into the target board.

No luck so far. What are the steps needed?

Thank you in advance!

  • Please, take a look at the original question for further details
  • You have a custom board and want to program it without connecting the JTAG, is that correct?

    Is the device on the custom board blank? If the device is programmed, the ROM boot-loader is bypassed.

    How are you connected from the PC to the device on the custom board? If you want to use the serial boot-loader (UART0), you must connect to the serial port pins. A USB connection will not work. (On the Launchpad the debugger device creates a virtual serial port that connects to UART0 of the main device.)

    What frequency crystal are you using? If it is not 16MHz, then you must use autobaud.
  • Bob,

    these are the steps I followed:

    -erased the target board via JTAG

    -open LMFlashProgrammer, set UART with auto baud rate, transfer = 60, program address offset = 0x0

    -connect the launchpad RXD and TXD pins to UART0 port of the target board (RX with RX and TX with TX)

    -click program, but an error occurs
  • And yes, I want to program the board without the JTAG (the JTAG works well anyway)
  • Ok, I think I understand. You are using the EK-TM4C123GXL Launchpad as a USB virtual serial port. The problem is that you have connected both your target TM4C and the main TM4C on the Launchpad in parallel to the debug serial port. Try removing the "VDD" jumper plug on the EK-TM4C123GXL board. This removes power from the main TM4C123 on the Launchpad. Unfortunately you will still be driving the unpowered pads of the main TM4C123, but others have gotten a similar configuration to work with the JTAG pins.
    ( See: e2e.ti.com/.../319187 )
    A better solution would be to connect the "RESET" pad (just above RXD) to ground. That will hold the main TM4C123 in reset while you use the virtual serial port to talk to your target TM4C123 device. Of course make sure you have a common ground between the Launchpad and your target board.

    If that does not solve the problem, can you get some scope pictures of the TXD and RXD signals?
  • Bob,

    the jumper has always been off. I tried to connect RESET to ground but I end up with the same error.

    As soon as I'll get an oscilloscope, I'll upload a scope of TXD and RXD.
  • Do you have any circuitry on PA0 or PA1 of your target board other than the connections to the EK-TM4C123GXL TXD and RXD pads?
  • No, just 2 female-female cables which go from RXD and TXD of the launchpad to the UART0 port of the custom board

  • Bob,


    Burn the 'boot_serial' program using JTAG, which is in Tivaware example : TivaWare_C_Series-2.1.4.178\examples\boards\...
    Then you can try uploading through uart

    Regards
    Asif
  • Asif,

    I burned boot_serial program with address offset 0x00, using JTAG that I found at: C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\dk-tm4c123g\boot_serial\ccs\Debug.

    So far so good.

    Then I tried to download my program using the UART0 port.

    I tried with offset 0x00 and 0x2800, but neither of those works.

    Regards,

    Marco

  • Any idea anyone? I do not know what I am doing wrong.

    Marco