Migrating ASF SAM C21 Application to MPLAB® Harmony v3 PIC32CM MC: Step 6
Building, Programming and Observing the Application
Procedure
Clean and build your application by clicking on the Clean and Build button.
In case of compilation errors, recheck the steps and build the project again.
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.
Open the Serial port configuration of Tera Term by navigating to Setup > Serial port….
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.
Now that the serial console is configured, reset the board and verify the application printing temperature and light sensor values continuously.
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.
Results
You successfully created an 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.