This application demonstrates the ability of the MPLAB Harmony USB Device Stack to support
USB Mass Storage Device. The application uses SD Card as storage media.
Description
This application creates a USB MSD Device that enumerates as a Flash Drive on the USB host
PC. The application allows read / write / modify / delete data from a PC host like any
normal Flash drive.
Downloading and building the
application
To clone or download this application from Github, go to the main page of this repository and then click Clone button to
clone this repository or download as zip file. This content can also be downloaded using
content manager by following these instructions.
Following table gives the details of project configurations, target device used,
hardware and its IDE. Open the project using the respective IDE and build it.
Powered the board with an
external power supply (or use the micro AB connector).
Setup the SD card (Note: exFAT
formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded boot
loader binary (boot.bin) and generated application binary (harmony.bin) into the SD
card.
Insert the SD card into the
SDMMC connector (SDMMC0) on the board.
Reset the board by pressing
the Push Button RESET, then START.
Connect USB to serial cable to
DBGU0 (to enable debug com port).
Connect the USB Micro-AB
Connector on the board to the computer using a micro USB cable.
LED near VDDCORE inscription on
the board indicates USB Device Configuration Set Complete event (The USB device
functionality has been activated by the USB Host).SAMA5D2 Xplained Ultra Board
Setup the SD card (Note:
exFAT formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded
boot loader binary (boot.bin) and generated application binary (harmony.bin) into
the SD card.
Insert the SD card into
the SDMMC1 slot on the board.
Reset the board by
pressing the Push Button BP3.
Short jumper
JP2(DEBUG_DIS).
Connect the EDBG USB
Micro-B port J14 on the board to the computer using a micro USB cable.
Use the "A5-USB-A"
connector (J23 - Micro A/B connector) on the board to connect the USB device to the
USB Host.
RGB LED turning to Green
indicates USB Device Configuration Set Complete event (The USB device functionality
has been activated by the USB Host).
Setup the SD card (Note: exFAT
formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded boot
loader binary (boot.bin) and generated application binary (harmony.bin) into the SD
card.
Insert the SD card into the
SDMMC0 Card Connector (J9) on the board.
Reset the board by pressing
the Reset Button (SW2)
Connect the USB-A Micro AB
connector (J10) on the board to the computer using a micro USB cable.
Press the "START_SOM" button to
activate board start-up.
RGB LED turning to Green
indicates USB Device Configuration Set Complete event (The USB device functionality has
been activated by the USB Host.SAMA7G5-EK Evaluation Kit
Powered the board with an
external power supply (J1) or power supply the board by connecting J7 to the computer
using a micro USB cable.
Setup the SD card (Note:
exFAT formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded
boot loader binary (boot.bin) and generated application binary (harmony.bin) into
the SD card.
Insert the SD card into
the SD Card Connector (J4) on the board.
Reset the board by
pressing the Reset Button (nRST)
Press the "nSTART" button
to activate board start-up.
Connect the USB Micro AB
connector (J7) to the computer using an USB cable.
RGB LED turning to Green
indicates USB Device Configuration Set Complete event (The USB device functionality
has been activated by the USB Host).
Setup the SD card (Note:
exFAT formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded
boot loader binary (boot.bin) and generated application binary (harmony.bin) into
the SD card.
Insert the SD card into
the μSD-CARD connector (J6) on the board.(This connector is present on the bottom
face of the board)
Reset the board by
pressing the Push Button RESET.
Press the "START" button to
activate board start-up.
Insert an SD Card to the
SDMMC1 connector(J7).
Connect the USB Type-C
(USB-A) Connector (J1) on the board to the computer using a USB Type-C cable.
RGB LED (D5) turning to
Green indicates USB Device Configuration Set Complete event (The USB device
functionality has been activated by the USB Host).
SAM9X75-Curiosity Development Board
Setup the SD card (Note:
exFAT formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded
boot loader binary (boot.bin) and generated application binary (harmony.bin) into
the SD card.
Insert the SD card into
the μSD-CARD connector (J14) on the board.
Reset the board by
pressing the Push Button RESET.
Press the "START" button to
activate board start-up.
Connect the USB Micro-B
(USB_A) Connector (J2) on the board to the computer using a USB cable.
RGB LED (LD1) turning to
Green indicates USB Device Configuration Set Complete event (The USB device
functionality has been activated by the USB Host).
Setup the SD card (Note:
exFAT formatted SD Cards are not supported)
Download harmony MPU
bootstrap loader from this location.
Copy the downloaded
boot loader binary (boot.bin) and generated application binary (harmony.bin) into
the SD card.
Insert the SD card into
the SD-CARD connector (J10) on the board.
Reset the board by
pressing the Push Button RESET.
Press the "START" button to
activate board start-up.
Connect the USB Type-C
Connector (J3) on the board to the computer using a USB cable.
RGB LED turning to Green
indicates USB Device Configuration Set Complete event (The USB device functionality
has been activated by the USB Host).
Running the Application
This demonstration uses the selected hardware platform as a logical drive on the
computer using the internal Flash of the device as the drive storage media.
Connect the hardware platform to a computer through a USB cable. The device
should appear as a new drive on the computer named "Drive Name". The drive can used to store
files. The LEDs on the demonstration board will indicate the USB state of the device. Refer
to the Configuring the Hardware section for the selected target hardware.
Note that the user should ensure that the Host is not currently writing data to
the media before detaching the device. On a Windows computer before removing the device
click on "Safely Remove Hardware" and click on "Eject Media".