I am trying to sample 2 analog channels with the SAR and push this data with the DMA to the FFT module on a 5535. There are good examples of the touch screen and battery measurement using the SAR but I need to capture 2 analog streams at a known frequency and perform a FFT on both. I have time to process after I capture 0.5 seconds of data so I was planning on captureing one channel and going directly to the FFT memory area and then sticking the second channel data in memory to move over after processing the first channel's FFT. My question is how can I configure the DMA and SAR to capture two Analog inputs at 25Khz each while switching between AIN2 and AIN3?
I have already configured the SAR to sample the two inputs and capture the data into an array and that is what has brought me to this problem. I grounded AIN2 and pulled AIN3 high then sampled them at 64Khz for 20 samples in a for loop. The SAR is configured for a single measurement and I wait on the ADC busy before switching channels and starting the next sample, however the 64Khz is the SAR processing and doesn't include the channel switch and for loop processing time so I don't really have 32Khz sampled data of each channel. Will the DMA allow me to perform the switch and maintain timing?