本帖最后由 wufei608 于 2012-9-2 12:34 编辑
当使用DMA传输SD数据时,为什么FIFO地址不自增啊?没理解SDIO的FIFO,请大家帮菜鸟解决一下。谢谢大家了…………
代码如下:
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)SDIO_FIFO_ADDRESS; //外设地址,fifo
DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)BufferDST; //目标地址
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
//外设为原地址
DMA_InitStructure.DMA_BufferSize = BufferSize / 4; //1/4缓存大小
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;//使能外设地址不自增
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
//使能存储目标地址自增
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word; //外设数据大小为字,32位
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Word;
//外设数据大小为字,32位
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
//不循环,循环模式主要用在adc上
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
//通道优先级高
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
//非 存储器至存储器模式
DMA_Init(DMA2_Channel4, &DMA_InitStructure); |