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 , TM4C123GH6ZRB , TM4C123GH6ZRB , 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

Run the usb_stick_demo Program

After the usb_stick_demo program is loaded into the flash, the processor will skip the usb_stick_update (the bootloader application) and will directly jump to the user application (the usb_stick_demo).

With the terminal window open, you will see messages as shown in Figure 15. The usb_stick_demo is waiting for the user to press the SW1 switch to transfer the control back to the usb_stick_update routine to force a new update of the user application.

Before pressing the SW1 switch, carefully observe the LED light on the LaunchPad. The LED will start with one particular color (red) and sequence to blue then green after each update of the user application. This is a confirmation that a new update happened even if the same usb_stick_demo is loaded again.

spna243-usb-stick-demo-outputs.pngFigure 15. usb_stick_demo Outputs

Next, press the SW1 switch. After the SW1 switch is pressed, a message is displayed on the terminal window indicating it is now waiting for the USB Memory Stick to be inserted and control is transferred back to the usb_stick_update routine.

spna243-usb-stick-update-waiting-for-the-memory-stick-insertion.pngFigure 16. usb_stick_update Waiting for the Memory Stick Insertion

After the memory stick is inserted, a new image of FIRMWARE.BIN (usb_stick_demo or your own custom user application) is loaded to the flash at address 0x4800. Run the updated user application. Carefully observe the LED light again if you are loading the same usb_stick_demo program image. You should see a different LED light color compared to the last run. Repeat Section 6.5 and you will see the LED light color sequencing between red, blue and green.