AT91SAM7S - ADC vs DMA?

Mar 03, 2009 1 Replies

I'm probably missing something very simple, but can someone elucidate to me how to use the PDC in the AT91SAM7S family to sample a block of data out of the ADC at a specific sample rate without processor intervention?



I want to acquire a small block (100 samples) of data at 8kHz and use the RXPTR/RXNPTR pair to double-buffer the incoming data stream; i.e. receive into one buffer while I process the other. So my samples should be 125us apart.



From reading the datasheet and looking at the AT91F_xxx inline macros provided by Atmel, I absolutely cannot work out what would set this sample rate. (Actually I find the whole device extremely difficult to understand, since using almost any peripheral requires cross- referencing half a dozen sections of the datasheet :().



Any clues?



Thanks.


Looks to me like you have to dedicate one of the timers to establish your sample rate and use the TRIGSEL bits of the ADC_MR register to select which timer controls the sample process.

Eric

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required