Introduction
MPLAB® Harmony v3 is a software development framework consisting of compatible and interoperable modules that include peripheral libraries (PLIBs), drivers, system services, middleware, and third-party libraries. The MPLAB Code Configurator (MCC) is a GUI-based tool that provides an easy way to enable and configure various MPLAB Harmony modules. The MCC is a plug-in to the MPLAB X Integrated Development Environment (IDE).
The PIC32CM JH family of microcontrollers (MCUs) is the next generation of the popular SAM C21 family of Arm® Cortex®-M0+ based MCUs. The PIC32CM JH family of MCUs delivers a variety of popular features plus extended memory options up to 512 KB of Flash and 64 KB to help create designs that need functional safety, enhanced touch, or security. This family pin is compatible with the SAM C21 family in the 32-pin, 48-pin and 64-pin packages.
This document explains how to create a simple application on a Cortex-M0+ based PIC32CM JH01 Microcontroller using the MCC with MPLAB Harmony v3 modules. The objective of this application is to toggle an LED on a timeout basis and print the LED toggling rate. For this demonstration, the following MPLAB Harmony v3 modules are used and configured using the MCC:
- The PORT pin to toggle LED.
- Real-Time Clock (RTC) PLIB to periodically sample LED toggling rate.
- External Interrupt Controller (EIC) PLIB to change the toggling rate when there is a switch press event.
- Serial Communication Interfaces (SERCOM (SERCOM configured as USART)) and DMA PLIBs to print LED toggling rate on COM port terminal application (Serial Console) running on a computer.