Step 2: Configuration of SysTick Timer

Last modified by Microchip on 2026/06/29 10:51

Configure SysTick Timer

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 these steps to configure the SysTick timer and Universal Synchronous Asynchronous Receiver Transmitter (USART) peripheral.

After launching MPLAB Code Configurator (MCC), select System in the Project Graph. The configuration options will appear on the right side of the interface. Expand Cortex-M23 Configuration > SysTick, then select Enable SysTick.

Configuration Options                  


Configure SERCOM3 as USART Peripheral

After configuring SysTick, navigate to the Device Resource tab. In the Device Resource panel, expand Libraries > Harmony > Peripherals > SERCOM > 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

Right-click the Yellow UART diamond icon in SERCOM3 and select STDIO from the Available Consumers drop-down menu. This setup enables functions such as printf() to transmit data to the terminal.

SERCOM3

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                                                 

Open the Pin Configuration tabs by clicking Project Graph > Plugins > Pin Configuration.

Pin Configuration                                                 

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                                                                            

 


Arm® TrustZone® for Armv8-M

Go to Plugins drop-down options in Project Graph and then 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.

Arm TrustZone for ARMv8-M window

Back to Top