MCUXpresso SDK Documentation

ftm_pdb_adc12

ftm_pdb_adc12#

Overview#

This application demonstrates how to use the trigger signal generated by FTM to trigger the ADC conversion through PDB 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 PDB module. When the PDB is triggered, the PDB counter increase. Once the PDB 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_pdb_adc12 demo.

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-KE15Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE15Z 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-KE16Z
Hardware requirements
  • Micro USB cable

  • FRDM-KE16Z 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.