In my setup, I will be using both ADC channels as follows:
ADC0 has 3 channels which are sampled at 100 Hz each.
ADC 1 has 2 channels which are sampled at ~30 KHz each.
For the slow ADC0 channels, I'd like every 10 ms to sample each of the 3 inputs and DMA the result into a 3-by-10 array (so I'd essentially get an interrupt every 100 ms with 10 new samples for each channel).
For the faster ADC1 channels, the operation is essentially the same except there are only two channels and my DMA buffers will be much larger (say 256 samples for each channel).
My question is in using the PIT and/or PDB modules to drive these. I've done single channel sampling with both PIT and PDB, but in attempting to move to the 'scan' method as described in AN4590 I'm not sure if I should be using one or or the other (or both).
Based on other postings here, I think that for the high speed sampling, it makes sense to setup the PIT to produce a 30 KHz interrupt which feeds into the PDB trigger. The PDB then generates two pulses -- one is offset by 0 clocks and triggers the reading from the first ADC1 channel, and the second is offset by ~10us and triggers sampling the second ADC1 channel.
For the slower sampling, I'm not sure yet what makes the most sense to do.
Any thoughts or tips are appreciated!