MICROCHIP PIC32MZ EF Curiosity Development Board Owner’s Manual
- July 29, 2024
- MICROCHIP
Table of Contents
MICROCHIP PIC32MZ EF Curiosity Development Board
Product Specifications
- Product Name: PIC32MZ EF Curiosity
- USB Mass Storage Device Demo with Multiple Drives (Logical Units – LUN)
- Microcontroller: PIC32MZ2048EFM100
- USB Module: Hi-Speed USB
Product Usage Instructions
Required Tools and Applications
- PIC32MZ EF Curiosity Development Board (DM320104)
- MPLAB X IDE
- msd_multiple_luns project
- Microchip Software Framework
Building the Application
- Download the msd_multiple_luns project to your local PC.
- Open the project in MPLAB X IDE.
- Select configuration for PIC32MZ EF Curiosity board.
- Clean and Build the project.
Configuring the Hardware
- Mount the SD Click board on mikro bus interface J10.
- Insert a micro SD card into the microSD click board card slot.
- Power the PIC32MZ EF Curiosity Development Board from a Host PC using a Type-A male to micro-B USB cable connected to Micro-B port (J3).
- Ensure a jumper is placed in J8 header (between pins 4 & 3) for power supply from debug USB connector.
- Connect the PIC32MZ EF Curiosity Development Board to the Host PC as a USB Device through a second Type-A male to micro-B USB cable connected to Micro-B port (J12).
Frequently Asked Questions (FAQ)
-
Q: What do I need to run the USB MSD Multiple LUNs demo?
- A: You will need the PIC32MZ EF Curiosity Development Board, MPLAB X IDE, msd_multiple_luns project, and Microchip Software Framework.
-
Q: Where can I find the required tools?
- A: The PIC32MZ EF Curiosity Development Board is available from Microchip Direct. MPLAB X IDE can be downloaded from the official Microchip website.
-
Q: How do I configure the hardware for the demo?
- A: Mount the SD Click board on mikro bus interface J10, insert a micro SD card, power the board via USB, and connect it to the Host PC as a USB device.
PIC32MZ EF Curiosity
USB Mass Storage Device Demo with multiple drives (Logical Units – LUN)
Introduction
This application demonstrates the creation of a USB device with multiple drives or logical units (LUN). The storage media – SD Card, acts as one drive, and the internal flash memory (NVM) acts as the second drive. Data transfer between a computer and the logical units (SD Card / NVM) takes place through USB MSD. When connected to a USB Host (PC) both the SD Card and the NVM appear as two separate drives on the Host PC.
The PIC32MZ EF Curiosity Development Board contains PIC32MZ2048EFM100 MCU with Hi-Speed USB module that enables you to implement USB functionality through the micro-AB USB connector.
- PIC32MZ2048EFM100 32-bit microcontroller (U9).
- Two mikroBUS sockets to expand functionality using MikroElectronika Click adapter boards (J5, J10).
- X32 header for audio I/O using Microchip audio daughter boards (J14, J15).
- MRF24WN0MA, 2.4 GHz IEEE 802.11n compliant wireless module (U10).
- Header for flexible Ethernet PHY options using Microchip PHY daughter boards (J18).
- GPIO expansion header (J17).
- Debug USB connector for programming/debugging (J3).
- Target USB connector for PIC32 USB connectivity (Device/Host mode) (J12).
- Header for external 5V input (J7).
- Jumper to select power source: Debug USB connector, target USB connector and external +5V input (J8).
- Jumper to drive VBUS in Host mode (J13).
- Three user LEDs (LED1, LED2, and LED3).
- RGB LED (LED4).
- User button (S1).
- Reset Button (MCLR).
- ICSP header for external debugger, such as MPLAB® REAL ICE™ or MPLAB ICD 3 (J16).
- Jumper to select on-board debugger or external debugger (J2).
- 24 MHz crystal oscillator (X2).
Required Tools and Applications
Microchip Tools and Applications
You will need the following Microchip development tools to run USB MSD
Multiple LUNs demo
- PIC32MZ EF Curiosity Development Board (DM320104), available from Microchip Direct
- Download and install latest version of MPLAB® X Integrated Development Environment (IDE)
- Download and install the latest version of MPLAB® XC32 Compiler
- Optionally Download and install the latest version of MPLAB® Harmony Integrated Software Framework
Note
Using MPLAB® Harmony Integrated Software Framework you will be able to extend
the functionality of this project by adding new modules, software frameworks
and libraries to your project.
Building the Application
-
Download the msd_multiple_luns project to your local PC.
-
To build this project, you must open (in MPLAB X, File->Open Project) the msd_multiple_luns.X project (from
/msd_multiple_luns/firmware) in MPLAB X IDE, as shown below. -
Select configuration for PIC32MZ EF Curiosity board from the drop-down list as shown below.
-
The other configurations will not work under standalone mode. However, if you want to work with this project for other configurations listed, you can migrate this project into a Harmony project, and then build for other configurations. Please follow the instructions provided in Migrating from standalone Harmony project to standard Harmony project
-
The ‘pic32mz_ef_curiosity’ configuration sets up MPLAB X IDE to build and run the demonstration application on the PIC32MZ EF Curiosity Development Board, with the PIC32MZ2048EFM100 microcontroller. The USB Device Stack will be configured for Interrupt mode operation and High Speed operation and the USB Driver will be configured for Dynamic operation mode.
-
Clean and Build the project
-
Check the Build log, at the bottom of the MPLAB X IDE
Note: Often times a project won’t compile if you are on a Windows machine due to a limitation in the path length. Windows OS has a max path length of 260 characters, so file paths are sometimes truncated when attempting to compile which leads to files not being found by the compiler. Try putting the project in the topmost directory, usually “C: /”. For more information please see MSDN article from Microsoft.
Configuring the Hardware
-
Mount the SD Click board, “microSD click” from MikroElektronika (http://www.mikroe.com/click/microsd/) on the mikro bus interface J10.
-
Plug a micro SD card into the microSD click board card slot.
-
Power the PIC32MZ EF Curiosity Development Board from a Host PC through a Type-A male to micro-B USB cable connected to Micro-B port (J3). The cable is not included with the kit. Ensure that a jumper is placed in J8 header (between 4 & 3) to select supply from debug USB connector.
-
Connect the PIC32MZ EF Curiosity Development Board to the Host PC as a USB Device through a second Type-A male to micro-B USB cable connected to Micro-B port (J12).
Running the Demo
This application demonstrates the use of SD card and NVM storage media and
shows them as two logical drives on the computer.
- Open the project in MPLAB X IDE and select the PIC32MZ EF Curiosity project configuration.
- Build the code and program the device by clicking on the program button as shown below.
- With the code running, connect the PIC32 MZ EF Curiosity board to the USB Host PC through a Type-A male to micro-B USB cable connected to the port J12 on the PIC32 MZ EF Curiosity Board.
- Wait for the host computer to read the contents of the two media (SD Card and NVM).
- The device should appear as two new drives on the computer.
- The NVM media should appear as “Drive Name” and should have a sample “FILE.txt” file. The drive name for the SD card media depends on the micro SD card vendor. The drives can then be used to read or write files.
- LED3 illuminates once Curiosity board is enumerated as a Mass Storage Device by the USB host.
Note: Reprogramming the development board will cause any stored files in the NVM media to be erased.
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>