MCUXpresso SDK Documentation

aon_lpadc_interrupt

aon_lpadc_interrupt#

Overview#

The aon_lpadc_interrupt example shows how to use interrupt with aon_lpadc driver.

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. When running the project, typing any key into debug console would trigger the conversion. ADC watermark interrupt would be asserted once the number of datawords stored in the ADC Result FIFO is greater than watermark value. In ADC ISR, the watermark flag would be cleared by reading the conversion result value. Also, result information would be printed when the execution return to the main function.

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
  1. Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. 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 interrupt example
Press any key to get the ADC conversion result
ADC conversion value = 36368
Press any key to get the ADC conversion result
ADC conversion value = 36384
Press any key to get the ADC conversion result
ADC conversion value = 36377