adc_etc_edma#
Overview#
The adc_etc_edma example shows how to use the edma to transfer ADC convert result.
In this example, PIT is used as the hardware trigger source and is triggered once per second. Once ADC gets the trigger from the ADC_ETC, the conversion goes. When the conversion is done, the dma request will be sent, and the dma will transfers the conversion result to a global variable. The user presses the keyboard according to the prompt in the serial terminal to see the ADC conversion result.
Supported Boards#
EVKB-IMXRT1050
Hardware requirements
Mini/micro USB cable
EVKB-IMXRT1050 board
Personal Computer
Board settings
ADC0_IN15 is settings to ADC input, please sample voltage by J23-1 pin.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the adc etc edma demo in the terminal window:
Adc AutoCalibration Succeed.
Adc Edma Transfer Example Start.
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2016, voltage = 1.624
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2023, voltage = 1.630
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2017, voltage = 1.625
MIMXRT1060-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKB board
Personal Computer
Board settings
ADC0_IN15 is settings to ADC input, please sample voltage by J33-1 pin.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the adc etc edma demo in the terminal window:
Adc AutoCalibration Succeed.
Adc Edma Transfer Example Start.
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2016, voltage = 1.624
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2023, voltage = 1.630
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2017, voltage = 1.625
MIMXRT1060-EVKC
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKC board
Personal Computer
Board settings
ADC0_IN15 is settings to ADC input, please sample voltage by J33-1 pin.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the adc etc edma demo in the terminal window:
Adc AutoCalibration Succeed.
Adc Edma Transfer Example Start.
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2016, voltage = 1.624
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2023, voltage = 1.630
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2017, voltage = 1.625
EVK-MIMXRT1064
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1064 board
Personal Computer
Board settings
ADC0_IN15 is settings to ADC input, please sample voltage by J23-1 pin.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The log below shows the output of the adc etc edma demo in the terminal window:
Adc AutoCalibration Succeed.
Adc Edma Transfer Example Start.
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2016, voltage = 1.624
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2023, voltage = 1.630
Press any key to print output adc current convert value and voltage.
ADC current convert value = 2017, voltage = 1.625