Migrating ASF SAM C21 Application to MPLAB Harmony v3 PIC32CM MC: Step 6

Step 7.1: Build and Program the Application

1

Clean and build your application by clicking on the Clean and Build build_icon.png button.

In case of compilation errors, recheck the steps and build the project again.

2

Program your application to the device by clicking on the Make and Program program_icon.png button.

3

Open the Tera Term application (or another terminal console) on your PC and navigate to File > New connection.

tera_term_new_connection.png

4

Navigate to the Serial box in the opened window and select the port number that corresponds to the Embedded Debugger (EDGB) Virtual COM Port of your connected SAM L10 Xplained Pro. Then, press OK to open a serial connection.

tera_term_new_connection_window.png

5

Open the Serial port configuration of Tera Term by navigating to Setup > Serial port….

tera_term_serial_port.png

6

In the Serial port setup window, verify that the Baud rate is set to 9600 and other elements are set as shown in the image, then press OK.

tera_term_serial_port_setup.png

7

Now that the serial console is configured, reset the board and verify the application printing temperature and light sensor values continuously.

console_message_after_reset.png

8

Cover the light sensor on the I/O Xplained Pro board by placing your hand over it (or another element to put the light sensor in a dark environment) to vary the light value. Place a finger on the temperature sensor to vary the temperature.

console_message_after_covering_lightsensor.png

 Results

You successfully created a MPLAB Harmony v3 project from scratch. You configured and generated Harmony v3 peripheral library code for the I²C, USART, SUPC and ADC peripherals by considering the SAMC21 ASF example application. You also successfully migrated the application from ASF to Harmony v3.

 Analysis

In this lab, you have successfully created a project from scratch, added Peripheral Libraries (PLIBs), and migrated the application from ASF to MPLAB Harmony v3.

 Conclusions

In this tutorial, you discovered how to use MPLAB Harmony framework v3 and successfully created a project from scratch, added Peripheral Libraries (PLIBs), and migrated the application from ASF to MPLAB Harmony v3.

© 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.