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: LM flash programmer coonection via UART

Part Number: EK-TM4C1294XL

Hello everybody,

I am makeing science now again, I have open and using example boot_demo1 now. This example I am currently running in my kit EK-TM4C1294XL.

I have connection problem via UART with LM flash programmer utility, chceck images and suggest some idea to resolve my error please.

Code of example setting UART, in my computer i have kit as COM10 port.

void
SetupForUART(void)
{
    //
    // We need to make sure that UART0 and its associated GPIO port are
    // enabled before we pass control to the boot loader.  The serial boot
    // loader does not enable or configure these peripherals for us if we
    // enter it via its SVC vector.
    //
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

    //
    // Set GPIO PA0 and PA1 as UART.
    //
    ROM_GPIOPinConfigure(GPIO_PA0_U0RX);
    ROM_GPIOPinConfigure(GPIO_PA1_U0TX);
    ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

    //
    // Configure the UART for 115200, n, 8, 1
    //
    ROM_UARTConfigSetExpClk(UART0_BASE, g_ui32SysClockFreq, 115200,
                            (UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE |
                             UART_CONFIG_WLEN_8));

    //
    // Enable the UART operation.
    //
    ROM_UARTEnable(UART0_BASE);
}

Thank you.

  • Hello Petr,

    You are trying to connect to the serial boot loader via LMFlash, so it needs to be able to access the boot loader properly. However, I see no point where you would have an entry into the boot loader based on your limited code snippet.

    You need to either use boot_serial example, not boot_demo1, or you need to add to your example far more than just initializing the UART port.
  • Hello Ralph,

    I am using original example and code from boot_demo1 example for that error.

    Now I am looking into boot_serial example, and I dont know. I think it is only "empty" bootloader in this example and how I can add some own code like blinking flash or how to use this example please?

    Thank you

  • Hello Petr,

    You need both boot_serial and boot_demo1 to accomplish your goal.

    boot_serial is the Flash based bootloader, and must be programmed onto the device. Part of the programming for it will be to specify your Application Start Address which is APP_START_ADDRESS in bl_config. This allows the bootloader after it is invoked, to return to the application once it is updated.

    Then boot_demo1 is your application code. This code runs your application specific code such as blinking an LED etc. Within the boot_demo1 example also is the means to re-enter the serial bootloader. You can invoke the bootloader from the boot_demo1 application by pressing a button (SW1 I believe).

    So what you need to do is:

    1) Load boot_serial with proper settings to your LaunchPad
    2) Modify boot_demo1 to handle your application requirements, including if that means keeping a means to invoke the bootloader with in it
    3) Load boot_demo1 to your LaunchPad as well
    4) Launch LMFlash Programmer
    5) Press SW1 until blinking LED and/or other application processes stop which indicates bootloader is active
    6) Connect to the UART port and program your device with the new image via the serial bootloader
  • Hello Ralph,

    thanks for that idea. If I make that, in point 6) i have same error with connection.  I guess when I use CCS with boot_serial and send it to kit via Debug is bad idea? then I debug a boot_demo1 and delete boot_serial with second, boot_demo1?

    How can I may send it over CCS other way please?

    Thank you.

  • Ok now it look like epic.

    1)via LM flash programmer set Quickset - tm4c1294xl launchpad
    2) erase entire flash
    3)In CCS I run debug boot_serial start and exit it
    4) in LM flash programmer set manual - UART and pick a bin of boot_demo1 and set address 0x00004000 and check the box with reset MCU
    5)launch pad start blinking led, hit the button -> stop blinking
    6) in LM flash programmer I pick bin of modified boot_demo1 with faster blinking and send it with manual conf in LM flash programmer and address 0x00004000
    7) start blinking faster

    Interesting, I'm going to try to understand it now. How it probably works.

    Thanks for help Ralph.