Hi
The DMA operation of the ADC is quite easy to use.
The following code is about all that is needed to configure it:
ADC_RPR = (unsigned long)adc_setup->int_adc_result; // transfer start location
ADC_RCR = adc_setup->int_samples; // transfer count
ADC_PTCR = PDC_RXTEN; // enable transfer
ADC_IER = ADC_ENDRX; // enable interrupt on transfer complete
This causes the PDC to store
adc_setup->int_samples samples in the buffer
adc_setup->int_adc_result.
When all samples have completed, an end of transfer interrupt is generated.
The sample triggering can be controlled by rising edges on ADTRG. If you would prefer falling edges it may be easiest to insert an inverter in the path.
Regards
Mark
http://www.uTasker.com