我想问一下,我先用8个ADC 通道填充一个data[N][M] 的数组, N=256, M=8 通道,发现只能填充data[0][0]-到data[0][M],有数,其他都没数据。我这样设置对吗?stcDmaCfg.u16BlockSize = ADC1_SA_CHANNEL_COUNT;//一次8个数据 ADC1_SA_CHANNEL_COUNT= 8
stcDmaCfg.u16TransferCnt = 0;
stcDmaCfg.u32SrcAddr = (uint32_t)(&M4_ADC1->DR0);
stcDmaCfg.u32DesAddr = (uint32_t)dma_ad_val;//dma_ad_val[256][8]
stcDmaCfg.u16DesRptSize = ADC1_SA_CHANNEL_COUNT;
stcDmaCfg.u16SrcRptSize = ADC1_SA_CHANNEL_COUNT;
stcDmaCfg.u32DmaLlp = 0u;
stcDmaCfg.stcSrcNseqCfg.u16Cnt = 0u;
stcDmaCfg.stcSrcNseqCfg.u32Offset = 0u;
stcDmaCfg.stcDesNseqCfg.u16Cnt = 0u;
stcDmaCfg.stcDesNseqCfg.u32Offset = 0u;
stcDmaCfg.stcDmaChCfg.enSrcInc = AddressIncrease;
stcDmaCfg.stcDmaChCfg.enDesInc = AddressIncrease;
stcDmaCfg.stcDmaChCfg.enSrcRptEn = Enable;
stcDmaCfg.stcDmaChCfg.enDesRptEn = Enable;
stcDmaCfg.stcDmaChCfg.enSrcNseqEn = Disable;
stcDmaCfg.stcDmaChCfg.enDesNseqEn = Disable;
stcDmaCfg.stcDmaChCfg.enTrnWidth = Dma16Bit;
stcDmaCfg.stcDmaChCfg.enLlpEn = Disable;
/* Enable DMA interrupt. */
stcDmaCfg.stcDmaChCfg.enIntEn = Enable;
|