// Configure DMA Channel
DMADest = &DMABuf1[0]; //Point DMA destination to the beginning of the array
DMASource = &AdcMirror.ADCRESULT0; //Point DMA source to ADC result register base
DMACH1AddrConfig(DMADest,DMASource);
DMACH1BurstConfig(3,1,10); // 4 words/burst, srcbstep = 1(add 1 step),destbstep =
// 10(add 10 steps)
DMACH1TransferConfig(9,1,0); // 10 bursts/transfer,srctstep =1, dest = no change
DMACH1WrapConfig(1,0,0,1);
DMACH1TransferConfig(9,1,0) 这句应该是错的, 采10次,对于AD来来说,每次burst后,源地址都要往回指,目前地址也要往回指才对。
|