aon_lpadc_edma#
Overview#
The aon_lpadc_edma example shows how to use ADC to trigger a DMA transfer.
The aon_lpadc_edma example shows how to use ADC to trigger a DMA transfer. In this example, user should indicate a channel to provide a voltage signal(can be controlled by user) as the aon_lpadc’s sample input. A programmable watermark threshold supports configurable notification of data availability. When FCTRLn[FCOUNT] is greater than FCTRLn[FWMARK], the associated RDY flag is asserted which would generate a eDMA request and trigger the eDMA to move the ADC conversion result from ADC result FIFO to user indicated memory. Then the major loop waits for the transfer to be done. The results would be printed on terminal when any key pressed.
Supported Boards#
FRDM-MCXL255
Hardware requirements
Type-C USB cable
FRDM-MCXL255 board
Personal Computer
Board settings
Connect a external voltage source to the J2-7.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) 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 following lines are printed to the serial terminal when the demo program is executed.
Lpadc edma example
Press any key to get the ADC conversion result
10 times conversion result:
Value[0] = 36724
Value[1] = 36728
Value[2] = 36746
Value[3] = 36761
Value[4] = 36765
Value[5] = 36772
Value[6] = 36776
Value[7] = 36807
Value[8] = 36803
Value[9] = 36810