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.

TM4C1294NCPDT ROM Bootloader Setup - Quick Question

Hey All,

I am trying to configure the ROM Bootloader and I am pretty sure I am doing things correctly but I need to confirm. Right now I plan to program the BOOTCFG register such that when a certain GPIO is put at a certain level, the uC will enter the ROM bootloader and update the firmware via UART0.

Is setting up the ROM bootloader as simple as just having the appropriate bl_config.h configuration file present in the project folder? Or do I have to configure the UART peripheral in the uC and actually make a call to jump to the bootloader each time in the application (as per boot_demo1 and boot_demo2 examples from the most recent Tivaware release).

Cheers,

Bryan

  • Hello Bryan

    The ROM Boot Loader does not need the bl_config.h file. This file is meant only when using the Flash based bootloader.

    Regards
    Amit
  • Hello Amit,

    Thanks for your reply! So how should I proceed when utilizing the ROM based bootloader to update via UART? By my understanding I should use the following procedure:

    1. Program the BOOTCFG Register with my desired settings
    2. Apply the boot signal to the GPIO that I specified in the BOOTCFG Register
    3. Send commands/packets to the ROM Bootloader as described in Tivaware Bootloader User's guide (spmu301a)

    Does the ROM Bootloader automatically configure the UART pins to receive commands?
    Does the ROM Bootloader default to use autobaud with the UART connection?

    Best Wishes,
    Bryan
  • Hello Byran,

    Yes. When the flash is all erased, then the ROM Boot Loader automatically starts without any Pin configuration or peripheral configuration and for UART uses AutoBaud.

    When there is an application code in flash such that 0x0 and 0x4 locations have a valid SP and PC, then the application may call the ROM Boot Loader by first configuring the UART peripheral and its IO's and then calling the function ROM_UpdateUART.

    Regards
    Amit
  • Hello Amit,

    I understand now! Thank you for the clarification and quick responses as usual! Have a great day.

    Cheers,
    Bryan
  • Hello Amit,

    I just realized there was one last thing I forgot to ask about...

    What is the default receive buffer size of the ROM bootloader? Is it safe to assume that the default values are those that appear in bl_config.h of the example projects (boot_serial)? I am talking about the value that corresponds to the keyword BUFFER_SIZE in bl_config.h

    Cheers,
    Bryan
  • Hello Bryan,

    And an additional resource that you may find useful.

    e2e.ti.com/.../471520

    Regards
    Amit
  • Hello Amit,

    Thanks for that thread, I read it earlier and it was very helpful. I am writing some code to allow a program to be flashed to the uC using a FTDI USB to UART cable, so my application differs slightly from using another development board as the device programmer

    Cheers,
    Bryan
  • Hello Bryan,

    The buffer must not exceed 256 bytes (as far as I remember).

    Regards
    Amit
  • Hello Amit,

    Below is an excerpt from the bl_config.h file from the boot_serial example project:



    //***************************************************************************** // // The number of words in the data buffer used for receiving packets. This // value must be at least 3. If using auto-baud on the UART, this must be at // least 20. The maximum usable value is 65 (larger values will result in // unused space in the buffer). // // Depends on: None // Exclusive of: None // Requires: None // //***************************************************************************** #define BUFFER_SIZE 20

    Does this mean by default we should always use less than the maximum or just use 20 as per the example project? Or does the ROM bootloader have a larger buffer for receiving packets?

    Regards,

    Bryan

  • Hello Bryan

    Definitely the Buffer is not "unlimited". The size is 20-65 and I think the limitation comes from USB which has 64 byte packets.

    Regards
    Amit