Low Power Application on SAM E54 Using MPLAB® Harmony v3 Peripheral Libraries: Step 1

Last modified by Microchip on 2023/11/09 09:08

Create MPLAB® Harmony v3 Project Using MPLAB X IDE

Select File > New Project from the main IDE menu.

Warning

Close all existing opened projects before you start creating a new project.


Back to top

In the Categories pane of the New Project dialog window, select Microchip Embedded. In the Projects pane, select 32-bit MCC Harmony Project, then click Next.

Choose Project pane

Information

If the 32-bit MPLAB Harmony 3 Project is not displayed, install MCC.


Back to top

Browse to the folder you downloaded the framework to in the Framework Path edit box, then click Next.

Information

For more information on the content manager, see the "Download MPLAB Harmony Framework" section of the "MPLAB Harmony Configurator Overview" page.

Manage Framework pane


Back to top

In the Project Settings window, apply the following settings:

  • Location: Indicates the path to the root folder of the new project. All project files will be placed inside this folder. The project location can be any valid path, for example: <Your_folder>\dev\same54_low_power.

  • Folder: Indicates the name of the MPLABX .X folder. Enter "sam_e54_xpro" to create a sam_e54_xpro.X folder.

  • Name: Indicates the name of the project that will be shown in MPLAB X IDE. Enter "low_power_sam_e54_xpro" to set the project's name.

Information

The Path box is read-only. It will update as you make changes to the entries.

  • Click Next to proceed to Configuration Settings.

Name and Location pane

Information

Clicking on the Show Visual Help button will open a help window, providing a detailed description of the various fields in the Project Settings window.

New Project Wizard


Back to top

Follow the steps below to set the project’s Configuration Settings.

  • Name: Enter the configuration name as "sam_e54_xpro".

  • Target Device: Select ATSAME54P20A as the target device.

Information

You can select the Device Family or enter a partial device name to filter the list in Target Device to make it easier to locate the desired device.

After selecting the target device, click Finish to launch MPLAB® Code Configurator (MCC).

Configuration Setting pane

Information

The New Project Wizard opens a Configuration Database Setup window to allow you to review the packages that will be used by the current project.


Back to top

While the MCC tool launches, Click on Select MPLAB Harmony content type.

MCC Content Manager tab Select a Content Type

Click on the Finish Button in the MCC Content Manager Wizard.

MCC Content Manager tab MCC Content Manager Wizard

The MCC plugin’s main window for the project will be displayed.

Project Graph


Back to top

Before proceeding, set up the compiler toolchain. Click on the Projects tab on the top left pane in MPLAB X IDE. Right click on the project name low_power_sam_e54_xpro and go to Properties.

Projects tab

Make sure that XC32 (v4.30) is selected as the Compiler Toolchain for XC32. Click on Apply and then click on OK.

xc32 setup

Information

Tool Tip: If you closed MCC accidentally and would like to open it again, go to Tools > Embedded > MPLAB Code Configurator v5 in MPLAB X IDE.


Back to top

Configure Clock Settings

Launch Clock Easy View by going to Project Graph in MPLAB X IDE and then select Plugins > Clock Configuration.

Tools menu

A new window, Clock Easy View, is opened inside MCC.


Back to top

The Clock Easy View window will then appear on your screen.

Clock Easy View window

Information

Tool Tip: Double click on Clock Easy View tab to maximize the window.​​​​


Back to top

Enable the XOSC CTRL 1 and configure the Oscillator input to 12 MHz.

xosc ctrl1 configuration


Back to top

Set XOSC1 as GCLK Generator 0 source.

gclk0 selection


Back to top

Set OSCULP32K as GCLK Generator 1 source.

gclk1 selection


Back to top

Set XOSC1 as GCLK Generator 2 source and set divisor value as 12.

gclk2 selection


Back to top

Disable the DFLL and FDPLL.

disable dfll and fdpll

Back to top