Step 2: Configure the USB Library

Last modified by Microchip on 2024/01/29 22:02

Select the MPLAB® Harmony Configurator (MHC) Project Graph tab. Remember, if you ever "lose” the MHC tool, you can find it under Tools > Embedded > MPLAB Harmony 3 Configurator.

Add a USB Device Layer stack into your project from the Available Components window.

Expand the tree Libraries > USB > Device Stack and select the USB Device Layer.

USB device layer

At this point, you will be asked to auto-activate some components required by the system. Select Yes for the USB High Speed Driver.

Select yes

Your Project Graph should now resemble the screen in the accompanying image.

Project graph 1

Back to Top


Attach an MSD Function Driver to your SD card driver.

Right click on the green DRV_MEDIA attachment box. From the Satisfiers list, select MSD Function Driver.

MSD function driver

Your Project Graph should now resemble the screen in the accompanying image.

Project graph 2

Back to Top


Configure the USB device layer.

You can now click on the USB device layer component box to display the configuration options available for this component. Set Product ID Selection to msd_sdcard_demo2.

Product ID selection

Back to Top


Configure the SD Card SPI Instance 0.

Click on SD Card (SPI) Instance 0 to display the configuration options.

SD card SPI

Increase the Number of Clients value to 2.

SD card SPI configuration

Back to Top


Save the MHC configuration.

Back to Top