This project demonstrates how the VDAC generated signal can be measured back with the IADC. A Logic Analyzer can be attached to the VDAC0 channel (check the Pin Routing section) to see the generated sine wave. The application continuously logs the input data of the IADC. If the VDAC0 and IADC0 channels are connected together with a wire, then the sine wave's samples are also visible on the CLI.
-
Wireless Starter Kit (WSTK) Mainboard (SLWMB4002A, formerly BRD4002A)
Note:
-
Tested boards for working with this example:
Board ID Description BRD4210a EFR32XG23 868-915 MHz +20 dBm Radio Board BRD4186c EFR32xG24 Wireless 2.4 GHz +10 dBm Radio Board BRD4270b EFR32FG25 902-928 MHz +16 dBm Radio Board BRD4400c EFR32xG28 2.4 GHz BLE and +14 dBm Radio Board
Connect the board via the connector cable to your PC to flash the example.
To test this application, you can either create a project based on an example project or start with an "Empty C Project" project based on your hardware.
-
Make sure that this repository is added to Preferences > Simplicity Studio > External Repos.
-
From the Launcher Home, add your product name to My Products, click on it, and click on the EXAMPLE PROJECTS & DEMOS tab. Find the example project filtering by "loopback".
-
Click the Create button on Platform - IADC loopback with VDAC example. Example project creation dialog pops up -> click Create and Finish and the project should be generated.

-
Build and flash this example to the board.
-
Create an Empty C Project project for your hardware using Simplicity Studio 5.
-
Copy all files in the
incandsrcfolders into the project root folder (overwriting the existing file). -
Install the software components:
3.1. Open the .slcp file in the project
3.2. Select the SOFTWARE COMPONENTS tab
3.3. Install the following components:
-
[Platform] → [Peripheral] → [VDAC]
-
[Platform] → [Peripheral] → [IADC]
-
[Platform] → [Peripheral] → [TIMER]
-
[Platform] → [Peripheral] → [Init] → [GPIO Init] → instance name: timer
-
[Application] → [Utility] → [Log]
-
-
Enable VCOM in the Board Control Software Component
-
Press Alt+Enter for opening properties and set the Print Float property here:

-
Build and flash the project to your board.
The example utilizes the VDAC peripheral's internal sine generator in order to generate the reference sine signal. For signal sampling, it uses the IADC0 peripheral in single ended mode. Please check the "Pin Routing" section below, to see the complete list of where the IADC0 and VDAC0 pins are routed.
The IADC IRQ will toggle a flag when the measurement is done. The logging will be done in the "app_proccess_action()". In order to measure the generated output signal, please follow the instructions below:
Connect the Logic analyzer with the ""VDAC0_CH0_MAIN_OUT"" of your device.
You will see the sine wave.
![]()
Connect the VDAC0 and the IADC0 pins physically with a wire.
The application will log in to Terminal 1.
If the logging doesn't start, please press an Enter in Terminal 1.
![]()
| Output pin | BRD4210a | BRD4186C | BRD4270B | BRD4400C |
|---|---|---|---|---|
| VDAC0_CH0_OUT | PA6 | PA6 | PA6 | PB4 |
| IADC0_Single_Input | PA7 | PA7 | PA7 | PB5 |
| Output pin | BRD4210a | BRD4186C | BRD4270B | BRD4400C |
|---|---|---|---|---|
| VDAC0_CH0_OUT | EXP_HEADER_11 | EXP_HEADER_11 | EXP_HEADER_11 | EXP_HEADER_11 |
| IADC0_Single_Input | EXP_HEADER_13 | EXP_HEADER_13 | EXP_HEADER_13 | EXP_HEADER_13 |