This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

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