Digit Recognition AI/ML Application on SAM E51 IGAT Curiosity Evaluation Kit Using MPLAB® Harmony v3: Step 1
Create MPLAB® Harmony v3 Project
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.
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".
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
- 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
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
After selecting the target device, click Finish to create and open the MPLAB Harmony v3 Project
In the Project Settings window, apply the following settings:
Before proceeding, set up the compiler toolchain. Click on the Project Properties icon in the digit_recognition_sam_e51_igat - Dashboard tab.
You will see the Content Manager window, click on the Select MPLAB Harmony button in the Content Manager window to launch Harmony.
Use the MPLAB® Code Configurator Content Manager for MPLAB Harmony v3 Projects to download the repositories.
For this lab, download the following repositories from GitHub:
- CSP: The following table shows the summary of contents.
Folder | Description |
---|---|
apps | Example applications for CSP library components |
arch | Initialization and starter code templates and data |
docs | CSP library help documentation |
peripheral | Peripheral library templates and configuration data |
- DEV_PACKS: The following table shows the summary of contents.
Folder | Description |
---|---|
Microchip | Peripheral register specific definitions |
arm | Core Specific Register Definitions (CMSIS) |
- MHC: The following table shows the summary of contents.
File/Folder | Description |
---|---|
doc | Help documentation and licenses for libraries used |
np_templates | New Project templates for supported toolchains |
*.jar | Java implementations of MHC modules |
mhc.jar | Main Java executable (run: java -jar mhc.jar -h) |
runmhc.bat | Windows cmd batch file to run standalone MHC Graphical User Interface (GUI) |
- CORE: The following table shows the summary of contents.
Folder | Description |
---|---|
apps | Example applications for core library components |
config | Core module configuration scripts |
docs | Core module library help documentation |
driver | Core module peripheral device drivers |
osal | MPLAB Harmony Operating System Abstraction Layer |
system | MPLAB Harmony system services |
templates | Application and system file templates |
- GFX: The following table shows the summary of contents.
Folder | Description |
---|---|
Legato | Legato graphics library, drivers, applications, and tools. |
Blank | Blank graphics interface for third-party graphics libraries |
- TOUCH: MPLAB Harmony 3 Touch Library is a royalty-free software library for developing touch applications on 32-bit microcontrollers with Peripheral Touch Controller peripheral. Developers can use it to integrate the touch-sensing capability into their applications. The library supports both self-capacitance and mutual-capacitance acquisition methods.
- TFLite Micro Apps: This repository contains the MPLAB® Harmony 3 TensorFlow Lite for Microcontroller (TFLM) Solutions and example applications. The following table shows the summary of contents.
Folder | Description |
---|---|
apps | Example applications to demonstrate usage of TFLM with Harmony |
config | TFLM module configuration files |
docs | TFLM help documentation |
scripts | Google Colaboratory notebook for creating Neural Network model |
third_party | Third-party component needed for TFLM |
If all the required content is available locally, click on the Finish button to launch MCC.
The MCC plugin’s main window for the project will be displayed.
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.
Verify Clock Settings
From the Project Graph tab, select Plugins > Clock Configuration to launch Clock Easy View.
A new window, Clock Easy View, is opened in the project’s main window.
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.
For high accuracy and stable clock, the 12 MHz external crystal output is fed to XOSC0 Oscillator.
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.
Also, configure the DFLL advanced settings by clicking on the Settings (gear) button of DFLL.