Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ASF USB host mass storage

Introduction

This application demonstrates a very simple bootloader application for the SAM D21. It use the USB Host capability to read data from a connected USB mass storage device.

Startup

After loading firmware, connect a FAT formatted mass storage device to the SAM D21 Xplained Pro with a firmware file called firmware.bin.

If the device is blank (never been bootloaded), the bootloader will always start. If the device have been programmed already you need to press the SW0 button on the SAM D21 Xplained Pro after reset to enter the bootloader. When running, the bootloader will search for a file called firmware.bin . If this file is found it will be programmed to the device and the new firmware will be started.

About example

The example uses the following module groups:

  • Basic modules: Startup, board, clock, interrupt, power management
  • USB host stack and MSC modules:
    services/usb/
    services/usb/uhc/
    services/usb/class/msc/host/
  • Thirdparty modules:
    thirdparty/fatfs