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 …