I am trying to capture a large sequence of 8-bit samples (4096) from an ADC to be later available to the CPU. To do that, I use DMA, as in the 8-bit ADC->Mem examples I found online. My problem is, it doesn't work. The 4096-long array I use for storing the samples always ends up the same, regardless of the output of the adc, and looks like it just contains some random chunk of memory (there's a lot of zeros, sections of alternating zeros and 255s, and a bunch of random garbage).
What is it that i'm not doing right here? Could it be to do with the fact that I am dealing with a large number of samples?