- Application: This example code uses ADC with PDMA to trigger multiple ADC channels only once, and each channel can perform multiple A/D conversions.
- BSP Version: M031_Series_BSP_CMSIS_V3.05.000
- Hardware: NuMaker-M032KI V1.0
The ADC of the M031 series essentially supports multiple operating modes. Among them, Continuous Scan mode can trigger multiple ADC channels at one time, but each channel can only A/D convert once. What we need is to perform A/D conversion multiple times for each channel. For example, if you want to trigger the conversion of three ADC channels 1, 2, and 3 at one time, and perform two A/D conversions on each channel, then the Continuous Scan mode can only convert channels 1, 2, 3, 1, 2, 3 in sequence. This is different from the conversion sequence 1, 1, 2, 2, 3, 3 we need.
This example code uses ADC Continuous Scan mode with PDMA's autonomous data movement, calculation of movement times, and interrupt function to achieve the requirement of triggering multiple ADC channels at one time, and each channel can perform multiple A/D conversions.
You can download the sample code at https://www.nuvoton.com/resource-downlo ... 1202133645
|