Harmony v3 Drivers and Middleware on PIC32MZ EF MCUs using FreeRTOS: Step 3
Last modified by Microchip on 2023/11/09 09:07
Configure USB High-Speed Driver
- Under the Available Components tab, expand Harmony > Drivers.
Double-click on USB High Speed Driver to add the USB driver to the project.
- Click on USB High Speed Driver to verify the default MPLAB® Harmony Configurator (MHC) values.
- Associate SYS_TIME system service with CORE TIMER peripheral by right-clicking on the red diamond highlighted in the accompanying image.
- Click on SYS_TIME to verify the default MHC values.
- Click on CORE TIMER to verify the default MHC values.
Configure USB Host Middleware and File System Service
Under the Available Components tab, expand Harmony > System Services.
Double-click on FILE SYSTEM to add the File System Service to the project.
- Associate the FILE SYSTEM Service with the Mass Storage Device (MSD) Client Driver by right-clicking on the red diamond highlighted in the accompanying image.
- Click on File System, check the box next to Use File System Auto Mount Feature, and select SYS_FS_MEDIA_TYPE_MSD for Media Type.
- Click on MSD Client Driver to verify the default MHC values.
- Click on USB_HOST to verify the default MHC values.
Select the Clock Diagram tab and configure the USB clock setup.
Enable Primary Oscillator Mode (POSCMOD) as External Clock (EC) mode.
- Setup Primary Oscillator clock speed as 12 MHz.
- Select USB PLL Input Frequency Select bit (UPLLFSEL) as 12 MHz.
Select the Pin Settings tab, scroll down to GPIO pin RJ13 (Pin Number 28) in the Pin ID column, and configure RJ13 as VBUS_AH to enable USB VBus.