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.

Using GPIO to Update Flash

Other Parts Discussed in Thread: UNIFLASH, TM4C1231H6PZ

Hi team,

From the ROM User's Guide: "The ROM-based boot loader is executed each time the device is reset when the flash is empty. The flash is assumed to be empty if the first two words are all ones..."

Is it possible to trigger the ROM-based boot loader using a GPIO in order to update/write to flash?

Regards,

Akash Patel

  • Hello Akash,

    Yes it is possible. Please refer the datasheet and look for the sub-section "Boot Configuration" in the chapter "Internal Memory". The BOOTCFG register can be used to configure a GPIO to branch to the ROM bootloader, on reset only, when the GPIO is asserted. The ROM Bootloader cannot be entered without a reset.

    BOOTCFG register is a non-volatile register which is resident in the Flash. Be very careful while using non-volatile registers as the changes to these registers are permanent and an "unlock" sequence (which erases the entire non-volatile memory region) has to be performed to clear these registers. Refer the sub-section "Non-Volatile Register Programming" which has details of how to program these registers. Refer the sub-section "Recovering a "Locked" Microcontroller" in chapter "JTAG Interface" for details of the "unlock sequence". The unlock sequence can be performed by using "LM Flash Programmer" or "Uniflash".

    Finally there is an errata on this register for both TM4C123 and TM4C129 devices. Refer the respective errata for details.

    Thanks,
    Sai
  • Hi Sai,

    Thanks for your detailed response! The errata that you are referring to is MEM#19 Certain GPIOs Cannot be Configured as boot pins, correct?

    Regards,
    Akash Patel
  • Hello Akash,

    Which device are you using - TM4C129 or TM4C123?

    For TM4C123 that might be the only one.

    For TM4C129 there are other Errata items like MEM #16 and MEM #17 that should be taken into consideration.

    Thanks,
    Sai
  • Hi Sai,

    We are using the TM4C123, thanks for checking.

    Regards,
    Akash Patel
  • Hi Sai,

    Looking over this again in the TM4C1231H6PZ data sheet on page 552, there appears to be a typo: "At reset, the user has the opportunity to direct the core to execute the ROM Boot Loader or the application in Flash memory by using any GPIO signal from Ports A-Q." I believe this should read "Ports A-H"

    Regards,

    Akash Patel