LPADC DMA3 Example#
The LPADC DMA3 example shows how to use the LPADC FIFO watermark DMA request with the DMA3 driver.
In this example, typing any key into the debug console triggers an LPADC software conversion sequence. The LPADC stores conversion results in the result FIFO. Each FIFO watermark request triggers DMA3 to move one result word from the LPADC result FIFO to memory. After the DMA transfer completes, the application prints the sampled conversion value.
Supported Boards#
FRDM-KW43
Hardware requirements
Type-C USB cable
FRDM-KW43 Board
Personal Computer
Board settings
Connect J24-3 (PTA5 ADC0_A3) to a voltage source.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal on PC for the serial device with these 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 DMA3 Example
ADC Full Range: XXXX
Please press any key to trigger the conversion.
ADC conversion word: 0xXXXXXXXX
ADC conversion value: XXXX
FRDM-MCXW70
Hardware requirements
Type-C USB cable
FRDM-MCXW70 Board
Personal Computer
Board settings
Connect J24-3 (PTA5 ADC0_A3) to a voltage source.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal on PC for the serial device with these 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 DMA3 Example
ADC Full Range: XXXX
Please press any key to trigger the conversion.
ADC conversion word: 0xXXXXXXXX
ADC conversion value: XXXX