Microchip PIC32CM5164LS00064 Handleiding

Microchip Niet gecategoriseerd PIC32CM5164LS00064

Lees hieronder de ๐Ÿ“– handleiding in het Nederlandse voor Microchip PIC32CM5164LS00064 (43 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 21 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/43
User's Guide
Atmel START to MPLAB Harmony 3 Migration Guide
Introduction
This document describes the different steps to consider when porting an embedded application from Atmel
ยฎ START
to the MPLABยฎ Harmony 3 framework. It covers the following migration aspects:
โ€ข How to create a MPLAB Harmony 3 project under MPLAB X IDE and navigate through the MPLAB Harmony
Configurator (MHC).
โ€ข How to identify different elements that compose a project under Atmel START.
โ€ข How to port the system/driver/middleware configuration using MPLAB Harmony Configurator.
โ€ข Important aspects to consider when porting the project application layer.
To illustrate these aspects, this document references the example available on AtmelSAM D21 IO1 Xplained demo
START. Prior starting the migration process, ensure that the following prerequisites are met:
โ€ข Internet connection with access to https://start.atmel.com
โ€ข Latest version of MPLAB X IDE https://www.microchip.com/mplab/mplab-x-ide
โ€ข Latest version of MPLAB Harmony 3 https://github.com/Microchip-MPLAB-Harmony
โ€ข SAM D21 Xplained Pro board (optional)
โ€ข I/O1 Xplained Pro board (optional)
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 1
Table of Contents
Introduction.....................................................................................................................................................1
1. Creating MPLAB Harmony 3 Project Under MPLAB X IDE.................................................................... 3
2. Identifying the Resources Used in the Atmel START Project..................................................................8
3. Porting Driver Configuration from Atmel START...................................................................................13
4. Porting the System PINMUX Configuration from Atmel START............................................................19
5. Porting the System Clock Configuration from Atmel START.................................................................26
6. Porting and Adapting Middleware......................................................................................................... 35
7. Porting the Application Source Code.................................................................................................... 38
The Microchip Website.................................................................................................................................41
Product Change Notification Service............................................................................................................41
Customer Support........................................................................................................................................ 41
Microchip Devices Code Protection Feature................................................................................................41
Legal Notice................................................................................................................................................. 41
Trademarks.................................................................................................................................................. 42
Quality Management System....................................................................................................................... 42
Worldwide Sales and Service.......................................................................................................................43
User's Guide
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 2
1. Creating MPLAB Harmony 3 Project Under MPLAB X IDE
The first step in this process is creating a MPLAB Harmony 3 project under MPLAB X IDE. This new project will
enable access to the MPLAB Harmony 3 Configurator (MHC), and access the list of software modules, such as
peripheral libraries, services and middleware, which are available for the target SAM device.
Figure 1-1.โ€€MPLAB Harmony 3 Configurator Available Components
To create a project for the SAM D21J18A device, follow these steps:
1. Launch MPLAB X IDE.
2. In MPLAB X IDE, select (or click the New Project icon).File > New Project
3. In the New Project window, under Steps, select Choose Project, and then under Choose Project section,
select these options: for Categories select Microchip Embedded, and for Projects select 32-bit MPLAB
Harmony 3 Project.
Note:โ€€ If the option 32-Bit MPLAB Harmony 3 Project is not available, users need to install the MPLAB
Harmony 3 Configurator plug-in by selecting Tools > Plugins > Available Plugins before continuing with this
demonstration. MPLAB Harmony 3 Configurator overview is available for download at https://
microchipdeveloper.com/harmony3:mhc-overview.
User's Guide
Creating MPLAB Harmony 3 Project Under MPLAB X ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 3
Figure 1-2.โ€€Creating an MPLAB Harmony 3-Based New Project
4. Click .Next
5. Select Framework Selection, and under Manage Framework section, enter Framework Path (Path to the folder
in which the MPLAB Harmony 3 packages are downloaded). For this demonstration, the MPLAB Harmony 3
packages are already downloaded at D:\microchip\github\h3.
Figure 1-3.โ€€New Project - Framework Selection
6. Click .Next
7. Select Project Settings, and under Name and Location section enter MPLAB Harmony 3 new project details:
โ€“ Location: Indicates the path to the root folder of the new project. All project files will be placed inside this
folder.
โ€“ Folder: Indicates the name of the MPLAB X IDE folder.
โ€“ Name: Enter name of the project. This name will be shown in the MPLAB X IDE.
โ€“ Path: It is read-only box. It will update as and when users make changes to other entries.
User's Guide
Creating MPLAB Harmony 3 Project Under MPLAB X ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 4
Figure 1-6.โ€€New MPLAB Harmony 3 Project
The software modules associated with the project configuration are seen by selecting Tools > Embedded > MPLAB
Harmony 3 Configurator.
Figure 1-7.โ€€Accessing MPLAB Harmony 3 Configurator
The associated MPLAB Harmony 3 Configurator list will be displayed as shown in the figure below.
User's Guide
Creating MPLAB Harmony 3 Project Under MPLAB X ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 6
Figure 1-8.โ€€MPLAB Harmony 3 Configurator - Available Component List
User's Guide
Creating MPLAB Harmony 3 Project Under MPLAB X ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 7
2. Identifying the Resources Used in the Atmel START Project
Before porting the application, users need to identify the software modules that compose the application. As both
Atmel START and MPLAB Harmony 3 frameworks provide a graphical configuration interface, hence it is simple to
identify the different drivers and middleware modules that are used by the application and compare them to the
available MPLAB Harmony 3 modules.
Figure 2-1.โ€€Atmel START Graphical Configuration Interface
โ€ข
๎˜๎˜ƒ
B
๎˜‚๎˜ƒ
๎˜๎˜Š๎˜‰๎˜‡๎˜ˆ๎˜‹ ๎˜„๎˜…๎˜‚๎˜ƒ๎˜†๎˜‹๎™„๎™ฒ ๎™ฏ๎œ‚๎™…๎™ ๎˜ฎ๎˜ผ๎˜‹๎™œ๎™–๎˜ก๎˜บ๎˜“๎›ณ๎šฝ ๎™จ ๎™” ๎›๎™ฐ๎›‡ ๎›”๎›๎›ฃ๎šฃ๎™น๎šฆ๎˜“๎œ‚ ๎™—๎œ‚ ๎šป๎™‡๎™ซ๎›ด ๎›“๎œ‚๎›‘
๎˜จ๎˜ฉ๎˜ช ๎˜๎˜ก๎˜…๎˜“๎˜ˆ๎˜ช ๎˜ƒ๎˜‚๎˜๎˜„๎˜…
๎˜…๎˜‘๎˜’ ๎˜‚๎˜Š๎˜†๎˜Œ๎˜‹ ๎˜ƒ๎˜Ž๎˜‰๎˜„๎˜๎˜๎˜ƒ๎˜’ ๎˜‡ ๎˜ˆ๎˜๎˜๎˜’
โ– ๎™ฅ๎˜ซ๎˜๎œ‚
โ–ก ๎™Ÿ๎›Ž๎™ž๎šŽ๎œ‚
โ–ก๎›๎˜ช
โ–ก S๎˜๎˜‰๎˜‡๎˜ˆ
-B ๎˜˜๎˜›๎˜ช๎˜†๎˜๎˜๎˜‰๎˜ฃ๎˜Š๎˜š๎˜—๎˜™๎˜ฃ๎˜๎˜Ž๎˜ช ๎˜ ๎˜‘๎˜•๎˜Œ๎˜‹๎˜ช๎˜”๎˜–๎˜’๎˜ ๎˜‡๎˜ช
๎˜‚๎˜ช ๎˜„๎˜๎˜ช๎˜ƒ๎˜ข๎˜ฆ๎˜ž๎˜ช๎˜œ๎˜ค๎˜Ÿ๎˜ฅ๎˜ง๎˜ช
๎™˜๎™ฆ ๎™ธ๎™ต๎™• ๎™ฌ ๎˜œ๎˜พ๎œ‚๎™™๎™ฑ๎˜ ๎™Ž๎™๎˜ฑ๎˜ฟ๎™‘๎˜๎™ˆ๎™ง๎™ก๎œ‚
๎šผ๎œ‚
GCL< ๎˜๎˜‚๎˜ƒ ๎˜๎˜‚๎˜ƒ ๎˜๎˜‚๎˜ƒ
๎˜‚๎˜๎˜ƒ๎˜ ๎˜…๎˜‡๎˜Š๎˜Œ๎˜๎˜Ž๎˜๎˜‰๎˜„๎˜ˆ๎˜‹๎˜‡๎˜†๎˜ 0
๎šฑ๎˜… ๎›ผ๎›ฝ๎œ‚๎˜ƒ๎›ป๎œ‚ ๎›• ๎™๎š๎™ฟ๎™ƒ๎›œ๎œ‚๎›ญ๎š๎œ‚๎›พ๎˜™๎›ง๎˜น๎˜ด ๎™›๎œ‚wmor ๎˜ต๎›ช๎šถ๎š๎œ‚๎›ฏ๎œ‚๎˜—๎šฏ๎šง๎šจ๎›ค๎œ‚ ๎›ฎ๎™ญ๎šท๎šบ๎œ‚๎˜˜๎˜‚๎œ‚ ๎š‘๎œ‚๎˜Š๎˜ฏ ๎˜ง ๎šƒ๎˜‹๎œ‚๎™ถ๎˜ƒ๎›ƒ๎š˜๎š‹๎œ‚๎˜™๎››๎š’๎›ฟ๎˜ƒ๎˜˜๎˜‚๎œ‚ ๎šค๎˜‘๎œ‚๎˜Ž๎˜‚๎˜‘๎œ‚๎› ๎˜จ๎˜‚๎š‰๎›Ÿ๎œ‚๎›ฉ๎˜…๎˜ฆ๎œ‚๎›บ๎™บ๎˜—๎›ต๎›ฌ๎œ‚๎›ฑ๎˜Ž๎œ‚๎›ฐ ๎›ฒ๎œ‚ ๎™‰๎œ‚๎˜ถ๎˜‚๎™ป ๎šฅ๎šŠ๎œ‚๎™๎œ‚๎š‡๎›‰๎›… ๎›จ๎˜…๎š“๎œ‚๎™๎™Š๎™ฎ๎™’๎œ‚ ๎˜ฅ๎›€๎›ซ๎™ผ๎š„๎˜ป๎˜ฌ๎œ‚
๎™ณ๎š”๎œ‚ ๎˜๎˜ท๎˜ฐ๎˜Œ๎œ‚๎™ท๎˜–๎šŸ๎œ‚๎˜‡๎›™๎›Š๎œ‚๎šพ๎›ท๎›ž๎˜š๎œ‚๎š๎œ‚๎š…๎˜†๎˜๎›„๎šž๎š™๎˜’๎œ‚๎›š๎œ‚๎šน ๎˜›๎˜•๎œ‚๎˜๎˜ˆ๎˜–๎˜†๎˜๎œ‚๎šฉ ๎˜ข๎œ‚๎˜”๎™‚๎›‹๎šš ๎˜ธ๎œ‚ ๎˜ž ๎˜Ÿ๎œ‚๎˜ฒ๎˜Œ๎˜†๎˜๎œ‚ ๎˜๎šก๎˜” ๎˜š๎œ‚๎˜๎šฐ ๎›–๎œ€๎œ‚๎œ๎›ธ๎˜’ ๎˜๎šˆ๎˜•๎œ‚ ๎š‚๎œ‚๎›๎šช๎›ˆ๎›น๎šด๎˜๎œ‚ ๎˜ˆ๎š ๎œ‚๎˜‰๎›Œ๎œ‚๎™€๎˜ณ๎œ‚ ๎˜๎œ‚๎˜ฃ๎˜‰๎šซ๎š•๎œ‚๎˜‰๎š›๎›—๎› ๎š†๎™š๎œ‚๎™ฝ๎˜‡๎˜‡๎šฒ๎šญ๎š€๎œ‚๎™ข๎˜๎šฎ๎˜๎œ‚๎™๎™ค๎˜ˆ๎œ‚๎™พ๎›†๎œ‚
๎›‚ ๎›ถ๎šณ๎šข๎›ฅ๎œ‚ ๎›ก๎œ‚ ๎›ฆ ๎š–๎œ‚๎˜ฉ๎œ‚ ๎šฌ๎šธ ๎š—๎œ‚๎˜  ๎˜„๎šฟ๎›’๎šต๎š ๎›˜๎™†๎™‹๎˜ญ๎œ‚๎™ด ๎˜ฝ๎œ‚๎™ช๎˜ค๎œ‚๎˜Š๎™ฃ๎˜„๎›ข๎šœ๎œ‚ ๎™Œ๎œ‚๎˜„๎˜‚๎šŒ๎œ‚๎™“๎™ฉ๎œ‚
Figure 2-2.โ€€Harmony 3 Graphical Configuration Interface (MHC)
Note:โ€€ Some applications include additional software functions or middleware that are not part of Atmel START.
Therefore, it is important to review the full application flowchart or project architecture to identify them.
Follow these steps while using the SAM D21 I/O1 example from Atmel START as a reference.
1. In Atmel Studio 7, open the Atmel START project to be ported by selecting Project > Re-Configure Atmel Start
Project.
User's Guide
Identifying the Resources Used in the Atmel ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 8
Figure 2-3.โ€€Reconfiguring Atmel START Project
Note:โ€€ The project can also be opened by loading its file at ..atstart/.atzip https://start.atmel.com/
Atmel START main window showing Load Project tab is displayed.
Figure 2-4.โ€€Load Project From a File Under Atmel START
2. When project is loaded, click on the Dashboard tab and identify the Atmel START drivers and its configuration.
User's Guide
Identifying the Resources Used in the Atmel ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 9
Figure 2-5.โ€€Driver Identification Under Atmel START
3. Check the application code and application flowchart to identify whether any additional services and
middleware are required. The figure below illustrates the SAM D21 I/O1 flowchart.
Figure 2-6.โ€€Additional Service Middleware Identification Using a Flowchart
Main
Atmel Start Init
Temperature Sensor
init
UART init
ADC Enable
Delay ms
Read temperature
Read light from ADC
Print information
System Delay ms
required
Printf / STDIO redirect
4. If MPLAB Harmony Configurator is not opened, from MPLAB X IDE open the MPLAB Harmony 3 Configurator
by selecting Tools > Embedded > MPLAB Harmony 3 Configurator.
User's Guide
Identifying the Resources Used in the Atmel ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 10
Figure 2-7.โ€€Accessing MPLAB Harmony 3 Configurator
5. Search for software module availability in Harmony 3 Configurator, and then drag and drop it into the Project
Graph window.
Figure 2-8.โ€€Identifying Software Module in MHC
The table below provides the drivers and middleware used for this demonstration.
User's Guide
Identifying the Resources Used in the Atmel ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 11
Table 2-1.โ€€Drivers and Middleware
ATMEL START Module Harmony 3 Module
Drivers IO1_LIGHT_SENS ADC
I2C SERCOM2
EDBG_COM SERCOM3
Systick (implicit) SYSTEM > SYSTICK
Middleware AT30SE75X None
STDIO Redirect STDIO
Note:โ€€ Specific development is required for AT30SE75X. Other drivers, system services, and middleware are
available under MPLAB Harmony 3.
User's Guide
Identifying the Resources Used in the Atmel ...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 12
3. Porting Driver Configuration from Atmel START
To port a driver from Atmel Studio to MPLAB Harmony 3 is a straightforward operation as it relies on the comparison
of Atmel START and MPLAB Harmony Configurator Graphical interfaces.
Figure 3-1.โ€€Atmel START to MPLAB X Driver Support
Follow these steps for the SAM D21 I/O1 Xplained demonstration:
1. Add peripheral library (drivers) to the MPLAB Harmony 3 project by dragging them from the Available
Component list to the Project Graph section.
Figure 3-2.โ€€Add Peripheral Driver from the Available Component List
2. Configure all the MPLAB Harmony 3 peripheral libraries according to their equivalent driver in Atmel START.
Note:โ€€ Specific Atmel START driver configurations can be seen by clicking individually on each of the driver
component in the application dashboard interface.
User's Guide
Porting Driver Configuration from Atmel ST...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 13
Figure 3-3.โ€€Access Driver Configuration in Atmel START
โ€“ ADC peripheral Library (IO1_LIGHT_SENS) configuration.
User's Guide
Porting Driver Configuration from Atmel ST...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 14
Figure 3-4.โ€€Port ADC Driver Configuration
โ€“ SERCOM3 peripheral Library (EDBG_COM) configuration
User's Guide
Porting Driver Configuration from Atmel ST...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 15
Figure 3-5.โ€€Port SERCOM3 Driver Configuration
โ€“ SERCOM2 peripheral Library (I2C) configuration
User's Guide
Porting Driver Configuration from Atmel ST...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 16
Figure 3-6.โ€€Port SERCOM2 Driver Configuration
โ€“ SYSTICK Service configuration
Figure 3-7.โ€€Enable Service Under MHC
After generating the project source code from the MHC interface by clicking or selecting MHC >
Generate Code, the peripheral libraries (PLIBs) configuration can be found in the following project directories:
User's Guide
Porting Driver Configuration from Atmel ST...
ยฉ 2019 Microchip Technology Inc. DS70005413A-page 17


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC32CM5164LS00064

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC32CM5164LS00064 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd