SPNA243 June   2020 TM4C1236D5PM , TM4C1236D5PM , TM4C1236E6PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PM , TM4C1237H6PZ , TM4C1237H6PZ , TM4C123FE6PM , TM4C123FE6PM , TM4C123FH6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6PZ , TM4C123GH6ZXR , TM4C123GH6ZXR

 

  1.   Using USB Host Mode on the EK-TM4C123GXL LaunchPad
    1.     Trademarks
    2. 1 EK-TM4C123GXL Board Overview
    3. 2 Board Modification to Make EK-TM4C123GXL USB Host/OTG Capable
    4. 3 Download and Import the USB Host Examples
    5. 4 Run the usb_host_mouse Example
      1. 4.1 Build and Flash the Program
      2. 4.2 Configure the Terminal Window
      3. 4.3 Run the usb_host_mouse Example
    6. 5 Run the usb_host_keyboard Example
    7. 6 Run the usb_stick_update and usb_stick_demo Examples
      1. 6.1 USB Memory Stick Updater (usb_stick_update) Overview
      2. 6.2 USB Stick Update Demo (usb_stick_demo) Overview
      3. 6.3 Add the FIRMWARE.BIN File in the Memory Stick
      4. 6.4 Run the usb_stick_update Program
      5. 6.5 Run the usb_stick_demo Program
    8. 7 References

USB Memory Stick Updater (usb_stick_update) Overview

This example application behaves the same way as a bootloader. It resides at the beginning of flash, and will read a binary file from a USB memory stick and program it into another location in flash. Once the user application has been programmed into flash, this program will always start the user application until requested to load a new application.

When this application (usb_stick_update) starts, if there is a user application (usb_stick_demo) already in flash (at APP_START_ADDRESS), then it will just run the user application. It will attempt to load a new application from a USB memory stick under the following conditions:

  • No user application is present at APP_START_ADDRESS
  • The user application has requested an update by transferring control to the updater

When this application is attempting to perform an update, it will wait indefinitely for a USB memory stick to be plugged in. Once a USB memory stick is found, it will search the root directory for a specific file name, which is FIRMWARE.BIN by default. This file must be a binary image of the program you want to load (the .bin file), linked to run from the correct address, at APP_START_ADDRESS.

NOTE

This example only supports the 8.3 filename naming scheme (also called a short filename or SFN). The name of the file must be 11 characters total, 8 for the base name and 3 for the extension. If the actual file name has fewer characters then it must be padded with spaces. By default, the file name is defined in the directive in the usb_stick_update.c as follows: #define USB_UPDATE_FILENAME "FIRMWAREBIN".

The USB memory stick must be formatted as a FAT16 or FAT32 file system (the normal case), and the binary file must be located in the root directory. Other files can exist on the memory stick but they will be ignored.

NOTE

The APP_START_ADDRESS for the user application is currently defined as 0x4800 in this example. However, this can be changed to any address that is aligned to the flash page size which is 0x400 for the TM4C123 MCU.