1.54 TrustZone SERCOM USART Start of Frame (SOF) Interrupt - PIC32CMLS60
This example application demonstrates how to use the SERCOM peripheral in USART ring buffer mode with SoF to wake-up device from sleep mode.
For this example:
- Performance Level 2 (PL2) is selected
Description
This example demonstrates how to wake-up from sleep mode using USART + Start of Frame feature. The USART is configured in ring-buffer mode (interrupts enabled). The example asks the user to enter 1 character. Once received, the device wake-up from sleep, displays a message then go back to sleep. For this example the Standby mode is default sleep mode used.
Downloading and Building the Application
To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.
Type | Path |
---|---|
Project Group | apps/trustZone/sercom/usart_sof_irq_ls60 |
Secure Project | apps/trustZone/usart_sof_irq_ls60/Secure/firmware |
Non-Secure Project | apps/trustZone/usart_sof_irq_ls60/NonSecure/firmware |
Project Name | Description |
---|---|
pic32cm_ls60_cpro.X pic32cm_ls60_cpro_NonSecure.X | Secure and Non-secure MPLABX project for PIC32CM LS60 Curiosity Pro Evaluation Kit |
Setting Up the Hardware
The following table shows the target hardware for the application projects.
Project Name | Board |
---|---|
pic32cm_ls60_cpro_Secure.X pic32cm_ls60_cpro_NonSecure.X | PIC32CM LS60 Curiosity Pro Evaluation Kit |
Setting Up PIC32CM LS600 Curiosity Pro Evaluation Kit
- Connect the Debug USB port on the board to the computer using a micro USB cable
Running the Application
- Open the Terminal application (Ex.:Tera term) on the computer
- Connect to the EDBG Virtual COM port and configure the serial settings as
follows:
- Baud : 115200
- Data : 8 Bits
- Parity : None
- Stop : 1 Bit
- Flow Control : None
- Build and Program the application using its IDE
- The console displays the following message
- Console displays the application header followed by message
- The message asks user to “Enter character to wake-up from sleep
mode”Note: For this example, the sleep mode used is Standby mode.
- Enter 1 character on terminal
- The device will wake-up and display message below:
- Then device will go back to sleep until new character is entered