2.3 DVRT Polling Mode SAM D21 Xpro
This example application demonstrates how to use Data Visualizer Run Time (DVRT) module in polling mode to transfer data to visualizer tool.
Description
This example demonstrates how to use the DVRT library to view and update volatile variables during run time. The DVRT process executes from main superloop. In the process, the example demonstrates reading the variables, changing the LED toggle rate from visualizer tool and read back the updated value.
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.
Path of the application within the repository is apps/dvrt_polling_sam_d21_xpro/firmware.
To build the application, refer to the following table and open the project using its IDE.
Project Name | Description |
---|---|
sam_d21_xpro.X | MPLABX project for SAM D21 Xplained Pro Evaluation Kit |
Setting Up the Hardware
The following table shows the target hardware for the application projects.
Project Name | Description |
---|---|
sam_d21_xpro.X | SAM D21 Xplained Pro Evaluation Kit |
Setting Up SAM D21 Xplained Pro Evaluation Kit
- Connect the Debug USB port on the board to the computer using a micro USB cable
Running the Application
- Build and Program the application using its IDE
- Select the DVRT for Main Project from drop down menu of DV Icon from the taskbar of MPLAB IDE
- Connect to the EDBG
Virtual COM port and configure the serial settings as follows:
- Baud Rate : 115200
- Char Length : 8 Bits
- Parity : None
- Stop Bits : 1 Bit
- From the options, change the address size to 4 and click on ⏵ icon to start communication.
- Add the variables into DVRT Streaming Table to read from device and update to tool.
- In the Time Plot tab, add the variables and observe the data as shown below
- In DVRT Write/Read Table tab, add the variable LED_toggle_delay, read and change its value to observe LED toggle at new time delay.
Board | LED Name |
---|---|
SAM D21 Xplained Pro Evaluation Kit | LED0 |