Step 2: Configure SERCOM3 as USART Peripheral and Pin Configuration

Last modified by Microchip on 2026/06/26 07:40

Configure Serial Communication (SERCOM3) as Universal Synchronous Asynchronous Receiver Transmitter (USART) Peripheral

Note: Create an MPLAB® Harmony v3 project using MPLAB X IDE. Refer to Lab 1 Step 2 for detailed project creation instructions. After the project is created, follow the steps below to configure the SERCOM3 peripheral for USART and set the TX and RX pins up for serial communication.

After launching MPLAB Code Configurator (MCC), navigate to the Device Resource tab. In the Device Resource panel, expand Libraries > Harmony > Peripherals > SERCOM3. To add the SERCOM3 Peripheral Library (PLIB) to the project graph, either double-click on SERCOM3 or drag and drop it into the Project Graph area.

Project Graph                      

Select the SERCOM3 peripheral library in the Project Graph. The configuration options will be displayed on the right side of the interface. By default, the SERCOM operation mode is set to USART communication. Configure SERCOM PAD [1] as the Receive Pinout.

Configuration Options

 


Pin Configuration for SERCOM3 USART and LED

Open the Pin Configuration tab by clicking Plugins > Pin Configuration.

Pin Configurations

 

Select the MCC Pin Settings tab and sort the entries by Ports, as shown in the accompanying image.

Pin Settings

Scroll down to pin number 7 (Pin ID: PB08) and pin number 8 (Pin ID: PB09). Configure PB08 as SERCOM3_PAD0 and PB09 as SERCOM3_PAD1. Set the Security Mode to NON-SECURE.

Pin Settings

 

Configure PA15 as a General Purpose Input/Output (GPIO) pin. Assign the appropriate pin name and specify the direction and latch settings required for LED operation.

Pin Settings

Note: For instructions on selecting pins for a mechanical switch, refer to Lab 2 Step 2, which provides detailed guidance on choosing GPIO pins for both Switch SW1 and LED.


Arm® TrustZone® for Armv8-M

Go to Plugins drop-down options in Project Graph and select Arm TrustZone for Armv8-M.

Project Graph

In the Peripheral Configuration > Peripherals section of the Arm TrustZone for Armv8-M window, configure the required peripherals to operate in Non-Secure mode. Set SERCOM3 to the Non-Secure configuration.

Peripheral Configuration


Nested Vectored Interrupt Controller (NVIC) Verify

Open the NVIC Configuration by navigating to the Plugins drop-down menu in the Project Graph and selecting NVIC Configuration.

NVIC Configuration

 

Verify that SERCOM3 is enabled in the NVIC Configuration.

NVIC Configuration

Back to Top