Digit Recognition AI/ML Application on SAM E51 IGAT Curiosity Evaluation Kit Using MPLAB® Harmony v3: Step 1

Step 1.1: Verify whether the MCC Plugin is Installed in MPLAB® X IDE

1

Verify that MPLAB® Code Configurator (MCC) is installed.

• Launch MPLAB X IDE from the Microsoft Windows® Start menu. Close any projects and files that are currently open
• Go to Tools > Embedded
• You will see MPLAB Code Configurator v4: Open/Close in the menu

mcc_launch_setup.png

If you don't see it in the menu, follow the instructions in the "Install MPLAB Code Configurator from the Microchip Plugins Update Center" section to install MCC.

Step 1.2: Create MPLAB Harmony v3 Project Using MCC on MPLAB X IDE

1

Select File > New Project from the main Integrated Development Environment (IDE) menu.

2

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

project_creation_setup.png

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

3

In the Framework Path edit box, browse to the folder where you downloaded the framework. If you haven't done this, or want to download it to a different folder, click the Launch Content Manager button, then click Next.

For more information on the content manager, view the video "MPLAB Code Configurator Content Manager for MPLAB Harmony v3 Projects".

project_path_setup.png

4

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: <Folder of your choice>\dev\digit_recognition
  • Folder: Indicates the name of the MPLABX .X folder. Enter sam_e51_igat to create a sam_e51_igat.X folder

Note: This must be a valid directory name for your operating system.

  • Name: Enter the project’s logical name as digit_recognition_sam_e51_igat. This is the name that will be shown from within MPLAB X IDE

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

  • Click Next to proceed to Configuration Settings
project_naming_setup.png

Note: 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.

project_naming_setup_help.png

5

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

  • Name: Enter the configuration name as sam_e51_igat
  • Target Device: Select ATSAME51J20A as the target device

Note: 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 create and open the MPLAB Harmony v3 Project
project_setup_finish.png

6

Before proceeding, set up the compiler toolchain. Click on the Project Properties icon in the digit_recognition_sam_e51_igat - Dashboard tab.

project_view.png

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

xc32_setup.png

7

After the project is created, click on the MCC button to launch the MCC tool.

mcc_launch_step.png

8

You will see the Content Manager window, click on the Select MPLAB Harmony button in the Content Manager window to launch Harmony.

select_mplab_harmony.png
Click on the image to full view

If all the required content is available locally, click on the Finish button to launch MCC.

launch_mcc.png
Click on the image to full view

9

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

launched_mcc_view.png
Click on the image to full view

Resource Manager

Resource Manager has two sections one is Project Resources and another one is Device Resources.

Project Resources

The Project Resources pane displays all of the peripherals currently configured for the project. For example, CMSIS and Device Family Packs (DFP). Select the peripheral here, and the peripheral is ready to be configured in the Configuration Options window. In the Project Resources pane, the System module is always present. The System module simplifies the setting of configuration bits and configures the system clock.

Device Resources

The Device Resources pane displays available peripherals for the device. Click on the peripheral you want to add to your project. The peripheral moves to the MCC Project Resources pane and is ready to be configured to your project's requirements. For example, Harmony Peripheral Libraries (PLIBs) for your device.

Versions

Versions shows MPLAB Code Configurator Plugin version information and different libraries along with their version. For example, the supported Harmony v3 library.

Project Graph

Project Graph shows the instantiated components. You can instantiate available components by double-clicking on the component in the Device Resources pane. After successful component instantiation, you can see the instantiated components under the Project Resources pane.

Configuration Options

Configuration Options displays the tree view of the selected component under the Project Graph tab. You can configure the selected component in this section.

Tool Tip: MCC, by default, has the Autosave MCC configuration File option enabled. If you want to disable the MCC autosave option, go to Tools > Options. After opening the Options window, go to Plugins and disable the Autosave MCC configuration file option.

mcc_autosave.png

Step 1.3: Verify Clock Settings

1

From the Project Graph tab, select Plugins > Clock Configuration to launch Clock Easy View.

clock_configuration_open.png

A new window, Clock Easy View, is opened in the project’s main window.

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

2

In Clock Easy View, configure the XOSC0 Oscillator and FDPLL 0 blocks as shown below to generate a 120 MHz CPU clock using an external Oscillator input source.

xosc0_osc_config.png
XOSC0 Oscillator Configuration

For high accuracy and stable clock, the 12 MHz external crystal output is fed to XOSC0 Oscillator.

fdpll0_clock_config.png
FDPLL 0 Configuration

Configure the GLCK Generator 1, DFLL, and GLCK Generator 2 blocks as shown below to generate 32 kHz and 48 MHz clocks using an external Oscillator input source. The 32 kHz and 48 MHz clocks will be used in the further steps as TC0 peripheral clock and SERCOM-USART peripheral clock sources respectively.

gclk1_clock_config.png
GLCK Generator 1 Configuration
dfll_clock_config.png
DFLL Configuration

Also, configure the DFLL advanced settings by clicking on the Settings (gear) button of DFLL.

dfll_advanced_config.png
gclk2_clock_config.png
GLCK Generator 2 Configuration



Next Step >

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.