MCUXpresso SDK Documentation

ftm_lpit_adc12

ftm_lpit_adc12#

Overview#

This application demonstrates how to use the trigger signal generated by FTM to trigger the ADC conversion through LPIT module.

For instance, the FTM0 is configured to work in PWM mode. And its channel 0 monitors the FTM counter and compares with the channel value. Once the FTM counter matches the channel value, an external trigger would be generated. TRGMUX would capture this trigger and route it to LPIT module. When the LPIT is triggered, the LPIT counter increase. Once the LPIT matches the ADC pre-trigger value, a trigger signal would generated and sent to ADC module. Finally, the ADC gets the trigger signal and start the conversion.

Running the demo#

When the example runs successfully, you can see the similar information from the terminal as below.

ftm_lpit_adc12 demo. ADC Full Range: 256

Input any key to trigger the ADC conversion. g_adc12InterruptCounter: 1 g_adc12InterruptCounter: 2 g_adc12InterruptCounter: 3 g_adc12InterruptCounter: 4 g_adc12InterruptCounter: 5 g_adc12InterruptCounter: 6 g_adc12InterruptCounter: 7 g_adc12InterruptCounter: 8 g_adc12InterruptCounter: 9 g_adc12InterruptCounter: 10 …

Supported Boards#

FRDM-KE17Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE17Z board.

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port 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.

FRDM-KE17Z512
Hardware requirements
  • Micro USB cable

  • FRDM-KE17Z512 board.

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the MCU-LINK USB port 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.

FRDM-MCXE247
Hardware requirements
  • USB-C cable

  • FRDM-MCXE247 board.

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the MCU-LINK USB port 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.