Hello ba2nguye@uwaterloo.ca,
My advice would be to check out the ftm_pdb_adc_chaining_s32k14x example - it comes with our toolbox, you can find it in S32_Examples/common/adc folder. There you have an example of how to synchronize ADC0 and ADC1 measurements with PWM commands issued by FTM via PDB. These 2 synchronized measurements are used to get the potentiometer value and the VDD LV value. You can read more about such techniques in Module 6: Current Sensing (Part 1/2) article (quick references - figures 9, 10 and 11).
I have also attached an adc example in which the measurements are triggered by the PDB, like this:
- PDB is software triggered
- PDB triggers subsystem in which ADC measurements are made (on pins A0 and A1).
Hope this helps!
Razvan.