This project shows how to use the IADC in high-speed mode on the EFM32PG28 Pro Kit (BRD2506A) board. IADC is used for oversampling the analog signal on the SMA connector with the high-speed feature. In the high-speed mode, the clock speed of IADC is doubled to 20 MHz (10 MHz in the normal mode). This feature is useful in applications, that require high-speed of sampling data.
- GSDK v4.4.3
Connect the board via a USB Type-C 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 example project.
-
Make sure that this repository is added to Preferences > Simplicity Studio > External Repos.
-
From the Launcher Home, add the
BRD2506
to My Products, click on it, and click on the EXAMPLE PROJECTS & DEMOS tab. Find the example project filtering by iadc and high-speed. -
Click the Create button on the "Platform - IADC High-speed Mode" example. Example project creation dialog pops up -> click Finish and 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
inc
andsrc
folders into the project root folder (overwriting the existing file). -
Open the .slcp file. Select the SOFTWARE COMPONENTS tab and install the software components:
- [Platform] → [Peripheral] → [ADC]
- [Platform] → [Peripheral] → [LDMA]
-
Build and flash the project to your device.
This project demonstrates using the IADC peripheral for oversampling and high-speed features to acquire 12-bit resolution conversion results. The firmware utilizes emlib_iadc
structures and functions to properly configure the peripheral and employ the appropriate offset corrections.
Once conversions are started, the IADC converts continuously and the LDMA transfers the results into an array. The IADC is clocked from the 39 MHz HFXO. The ADC prescaler divides this by 2. The sampling rate is 1.95 Msps.
To test the project, follow the below steps:
-
Update the firmware of your board from the Simplicity Launcher (if necessary).
-
Build the project and flash the image to the EFM32PG28 Pro Kit board.
-
Open the Simplicity Debugger and add the
singleBuffer
variable in theiadc_single.c
file to the Expressions Window. -
Apply a voltage to the IADC input pin (SMA connector)
-
Observe the
singleBufffer
array as it will display the ADC results 12-bit result with 1024 samples. ThesingleBuffer
array is VDD referenced and scaled 0-4095. The picture below illustrates thesingleBufffer
with the VMCU value as input. -
To observe the output pin pulsing, use the PB1 pin on the EFM32PG28 Pro Kit board. An edge (including rising or falling) is generated every 1024 samples after about 525 microseconds (uS).
-
Suspend the debugger, observe the measured voltage change in the Expressions Window and how it responds to different voltage values on the corresponding pins.