Input Capture Triggered ADC Measurements

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Input Capture Triggered ADC Measurements

961 Views
hubje3
Contributor II

I would like to sample an arbitrary waveform from a function generator synchronously to the sync output while timing the period of the sync.  To do this I have the input capture set to do a hardware trigger for the ADC which then does a series of measurements which are copied to RAM with the DMA.  In order to time the sync I have the prescale set to 1 which makes the FTM overflow often, so I also used the Global Time Base to synchronize 2 FTM's so that I could separate the ISR for the overflow from the input capture event ISR.

The problem I am having is that I am getting a hardware trigger from the FTM for the ADC when the timer overflow occurs.  Is there a way to stop this from happening?  Or will I need to do something different, such as have the input capture trigger the PDB which triggers the ADC, but even then I would assume I would see the same issue I am having.  In the end I would like to have a very repeatable delay from the Input capture event to the start of the ADC's measurement cycle.

I am using the TWR-K40X256 with Codewarrior 10.2.

Thanks,

Jeremy

Labels (1)
Tags (4)
0 Kudos
2 Replies

513 Views
zhaohuiliu
NXP Employee
NXP Employee

PDB can get triiger from FTM init or ext triggers event, and then PDB can trigger ADC as your configuration. Also, PDB has an ext trigger input from GPIO.  Are these triggers helpful for your use case?

513 Views
hubje3
Contributor II

I think that routing the sync signal to both the PDB ext trigger and the FTM module will work so that is the direction I am heading.

0 Kudos