Skip to content

differences_h2_to_h3

Thibaut VIARD edited this page Jul 1, 2019 · 5 revisions

Differences between MPLAB® Harmony 2 and MPLAB® Harmony 3

This document describes key differences between MPLAB® Harmony 2 and MPLAB® Harmony 3.

Now Supports SAM Devices!

MPLAB® Harmony 3 provides support for Micochip® ARM® Cortex®-based SAM devices in addition to support for MIPS based PIC32M devices.

ATSAM Devices Images

Because Microchip is always developing new things, support for new and existing devices is always ongoing. Refer to the Device Support table for the list of devices that are currently supported.

Differences in Peripheral libraries

Peripheral Library (PLIB) functions have been dramatically simplified in MPLAB® Harmony 3 relative to MPLAB® Harmony 2. The following table shows a few brief examples.

PLIBs APIs Examples

Note There is one implementation of each PLIB function per peripheral instance. In the previous table, the 'x' indicates the peripheral-instance number (as given in the device's data sheet).

To begin with, PLIBs are now fully implemented as callable functions instead of as inline functions. And, the functions provided emphasize quick and easy use of the most common peripheral features (such as reading and writing data and getting status). In many cases, simple blocking functions are provided that can be used in either blocking or non-blocking ways depending on whether or not the caller checks status to see if the peripheral is busy before calling the potentially blocking function.

Unlike MPLAB® Harmony 2, many MPLAB® Harmony 3 peripheral libraries implement peripheral Interrupt Service Routines (ISRs) directly and provide callback functions to allow callers to register their own functions receive immediate status notification in the interrupt-context. (In MPLAB® Harmony 2, it was a device driver's responsibility to implement the ISR.)

As with MPLAB® Harmony 2, MPLAB® Harmony 3 PLIBs are still the number one choice for users who want simple, direct, and efficient access to peripheral functionality without overhead necessary for device-to-device portability, operating system compatibility, or now even peripheral-instance indexing.

Differences in Drivers and Services

MPLAB® Harmony 3 device drivers and system services have been reimplemented to utilize the simpler peripheral libraries provided with MPLAB® Harmony 3. This results in a more numerous, but lighter weight, set of implementations. It also allows for simplifications in the Application Program Interfaces (APIs) for MPLAB® Harmony 3 drivers and services. Backwards backwards compatibility to MPLAB® Harmony 2 driver and service APIs is provided by adapters where needed, as illustrated by the following diagram.

Adapters

Note API adapters may not be available for beta versions. Check the core repository release notes for current status.

Of course, MPLAB® Harmony 3 drivers and services provide the same advanced features as they did for MPLAB® Harmony 2. This includes buffer queueing, support for shared access to multiple peripheral instances by multiple clients, and support for RTOS safety (through the MPLAB Harmony OSAL) wherever these features are needed.

Important! By default, selecting any drivers, services, or middleware for use in your project, the MPLAB® Harmony 3 Configurator now enables and adds CMSIS-FreeRTOS to your project to provide a simplified development model. You can disable it from within the MHC if you prefer to work "bare metal", without an RTOS. This is inverted from the default behavior of the MPLAB® Harmony 2 MHC.

No Differences in Middleware!

MPLAB® Harmony 3 provides the same industry leading middleware as MPLAB® Harmony 2, with no API or (in most cases) implementation changes. Middleware libraries use drivers and system services for device independence. Middleware modules are available that support displaying graphics, networking capabilities, USB connectivity, audio playback and recording, Bluetooth connectivity, cryptography, and other powerful capabilities often required by today’s embedded devices.

Note Microchip Technology Inc. is always striving to improve MPLAB® Harmony 3 and so middleware implementation updates and new capabilities may be added over time that will not be provided in MPLAB® Harmony 2. Always refer to the release notes and help documentation for any libraries in which you are interested.

Differences in the MHC GUI

There are several differences in the MPLAB® Harmony Configurator (MHC) for MPLAB® Harmony 3.

MPLAB® Harmony 3 Downloader

MPLAB® Harmony 3 utilizes GitHub for revision control, distribution, and installation. Instead of providing a single ever-growing installer executable, MPLAB® Harmony 3 has split up different modules and layers into different GIT repositories that are publicly hosted on the Microchip MPLAB® Harmony GitHub team account. However, users do not need to become Git or GitHub experts in order to use MPLAB® Harmony 3 as the improved MHC provides a very simple downloader that takes care of the details of downloading (or "cloning" if you happen to be a Git user) the selected repositories to the your development workstation. The following image shows an example of what it looks like, but refer to the MHC Wiki for details.

H3 Downloader

Library Components and the MHC Project Graph

After selecting and downloading the library modules you want to use, the MPLAB® Harmony 3 Configurator (MHC) allows you to select individual library "components" from the module repositories, add them to your project, connect them together visually using the interactive Project Graph, and configure them as desired for your system. The following image gives an example of what this workflow and the project graph look like.

Project Graph

Refer to the MHC Wiki for details on how to use the MHC.

The MPLAB® Harmony 3 MHC also includes new custom GUI configurators for the SAM devices, clocks, memory busses, cache controllers and other capabilities as well as the supported PIC32M devices.

Of course, the MHC still generates MPLAB® X projects, configuration and library source code, and application starter code. But, a number of improvements "under the hood" have been made to make selection of configuration options simpler and more robust.

Online Help

With the transition to GitHub, several new on-line documentation options are provided and you're using one of them right now - the MPLAB® Harmony 3 Wiki. The following diagram shows the relationships between these documents and the library module repositories.

H3 Online Docs

The www.microchip.com/harmony website is not new. But, the Welcome to MPLAB® Harmony 3 Wiki site and the main MPLAB® Harmony 3 User's Guide pages are key new documents published online. Also, every module repository provides its own instructional Wiki and the API help documentation (still provided in PDF, CHM, and HTML formats) is published online along with release notes. See links to each module's documentation in its readme.md file.