Skip to content

Latest commit

 

History

History
81 lines (39 loc) · 4.39 KB

GUID-C3A88DD5-DE20-4FEA-854D-19766CD503A5.md

File metadata and controls

81 lines (39 loc) · 4.39 KB

USB Device HID Bootloader

This example application shows how to use the Bootloader Library to bootload an application using USB Device HID protocol.

Bootloader Application

  • This is a bootloader application which resides from

    • The starting location of the flash memory region for SAM devices

    • The starting location of the Boot flash memory region for PIC32MZ devices

    • The starting location of Program Flash memory for PIC32MK, PIC32MX and PIC32MM devices

  • It uses the USB Device HID port with Product ID 0x3C to receive application hex from host PC using the Unified Bootloader Host Application

  • It calls the bootloader_Tasks() function which receives application to be programmed into flash memory over USB Device HID port

  • The application glows an LED once bootloader firmware is running

  • Trigger Methods

    • It uses the On board Switch as bootloader trigger pin to force enter the bootloader at reset of device

    • It checks for bootloader request pattern (0x5048434D) from the starting 16 Bytes of RAM to force enter bootloader at reset of device

Test Application

  • This is a test application which resides from

    • The end of bootloader size in device flash memory for SAM devices

    • The end of bootloader size in Program Flash memory for PIC32MK, PIC32MX and PIC32MM devices

    • The start of Program Flash memory for PIC32MZ devices

  • It will be loaded into flash memory by bootloader application

  • It blinks an LED and provides console output

  • It uses the On board Switch to trigger the bootloader from firmware

    • Once the switch is pressed it loads first 16 bytes of RAM with bootloader request pattern (0x5048434D) and resets the device

Development Kits
The following table provides links to documentation on how to build and run USB Device HID bootloader on different development kits

Parent topic:MPLAB® Harmony 3 USB Bootloader Application Examples