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.

TM4C129ENCPDT: Remote Over the air code (firmware) update

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

I am using a TM4C129ENCPDT interfaced to a GSM module (UART). I want to update the code on the micrcontroller remotely. My GSM module can download the bin files from my server over FTP. Any suggestions on how to flash the code downloaded by the GSM module on the microcontroller ? 

Note: I do not have any auxiliary controller interfaced.

  • Bobby,

    You can:

    - Transfer the new firmware to the MCU through the i2c module, using some sort of protocol that indicates that the data refers to a new firmware.

    - Then, store the firmware in a known location - if you have external NV memory available, that's a good option - otherwise, you can use a fixed area of your TM4C flash.

    - Then, use a custom bootloader that reads a flag in eeprom which indicates a new firmware is available - and have the bootloader swap the new firmware into the program execution area.

    We have been doing that successfully, it took a great deal to develop the bootloader, protocol and controls, but it is quite reliable.

    Regards

    Bruno

  • Hi Bobby.
    Please also refer to the Bootloader userguide for additional information on using I2C interface for updating your application on the microcontroller.
  • The interface is UART, not I2C. Sorry for the typing error. I also have an SD card interface available. To make things easier, I can copy the bin files to the SD card. Is there a way of flashing the MCU using the bin files on the SD card ? Is any bootloader that does this available online ?
  • Sorry it was a typing mistake. The interface is UART.
  • Hi Bobby,
    Bootloader via UART is supported. Please refer to the same Bootloader userguider. The TivaWare package provides an example bootloader called boot_serial that utilizes UART interface for downloading/updating the MCU application. The example can be found under <TivaWare_installation>\examples\boards\ek-tm4c1294xl\boot_serial. The boot_serial works in conjunction with another application example called boot_demo1 or boot_demo2. The boot_serial bootloader will download the application program image boot_demo1 or boot_demo2 via the UART interface.
  • Thank you for your reply. But still I would need to store the bin files downloaded over ftp in some location, right? The SD card would be more feasible in my case as space on the flash memory is limited due to the size of the existing code in the flash memory. So are there are any examples available on how to flash from SD card?

  • Bobby,
    If you have SD card, indeed you can store the new firmware in it.
    Actually, we go even father: we store both the NEW and the PREVIOUS firmware on separate locations of our accessory memory - so that, in case something fails after the update, the bootloader can revert to the previous working FW.
    I have not yet particularly worked with SD Card - it is on my to-do-list... I don't know if there are examples of specifically using the bootloader to interact with the SD Card. The bootloader that we use is a custom bootloader, NOT the one that comes ready on ROM, so it would not be too difficult to adapt it once the SDCard part is implemented.
    For company policies, however, I can unfortunately only give you "strategy" suggestions, not code itself nor the full solution.
    Bruno
  • Hi Bobby,
    The SD Card implementation on the TM4C uses the SPI interface to communicate. You can select SSI in the bl_config.h as the port to interface with the bootloader. However, we don't have a specific bootloader example to download/update application from the SD card.