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.

TM4C129XNCZAD: Update the firmware failed by ROM_UpdateUSB()

Part Number: TM4C129XNCZAD

Hi,

Since our TM4C has an external watchdog chip,

The GPIO must be used to output pulse to the watchdog chip every 1ms to avoid unintended system reset.

When using ROM_UpdateUSB() , the GPIO does not output pulse, which will make TM4C update failed.

Are there other ways to update the system ?

Many thanks,

Ray Yang

  • Hi,

      Are you using the GPIO pins that are configured for USB function. You can setup a timer that will generate an periodic interrupt every 1ms. In the timer ISR you can output your GPIO pulse to the watchdog. Just make sure the GPIO pin you choose is not used for USB function. 

  • Hi ,

    This project uses TI RTOS,  the timer is already occupied by the RTOS.

    Currently trying to use the flash base bootloader to solve the problem, but the progress is not very smooth.

    Ray Yang

  • This project uses TI RTOS,  the timer is already occupied by the RTOS.

    There are multiple hardware timers. Refer to the datasheet. TM4C129 GPTimer has a total of 14 16-bit timers. If you really run out of hardware timer, you can also use TI-RTOS's Clock Module to generate your periodic1ms tick. 

  • Update the firmware via ROM Bootloader,

    It will erase the all  Flash data, 

    This also includes the Timer ISR?

    If yes, then this will allow the external watchdog to reset the TM4C.

    Ray Yang

  • Yes, the ROM bootloader will erase the flash before it can program the new firmware. The erase and program will take time to complete. You need to make sure that the external watchdog does not issue a reset to the device when the device is in the middle of a erase/program operation. 

  • My difficulty is that the erase/program process needs to keep triggering the external watchdog to avoid resetting the TM4C, which eventually leads to update failure.

    Ray Yang

  • Hi Charles,

    We use a flash bootloader and modify the code, in the update_usb() to continuously trigger the external watchdog chip,
    to avoid system reboot and update failure.

    Thank you for your reply and help!

    Ray Yang

  • Hi Ray,

      I think I'm confused. All along, you talk about using ROM bootloader and now you talk about flash bootloader.  If you are using flash bootloader then you certainly can do what you want - continuously trigger the external watchdog while the erasing and and programming the flash because flash bootloader can be configured to not erase itself. 

  • Hi Charles,

    Sorry, I didn't make myself clear.


    At first I used the ROM Bootloader, but I found that if I didn't connect the JTAG Port, the ROM Bootloader would fail to update, and then I found the reason, it was the external watchdog that was messing up.

    At that time, I was wondering if there was a way to use the ROM Bootloader and keep triggering the external watchdog to avoid update failures, so I came to the forum for help.

    But with our hardware architecture, the path of using ROM Bootloader was not going to work, so I finally switched to Flash bootloader.

    Ray Yang