2010-06-12 04:38 AM
Can STM32F103 transfer data between internal sram and FMSC by DMA?
2011-05-17 04:54 AM
Hi,
Yes it is possible. FSMC is considered as memory location just like Flash and SRAM, so you have to use memory to memory mode (with no circular mode of course). Cheers.2011-05-17 04:54 AM
Yes. The example code in \Examples\DMA\FSMC shows FLASH-to-FSMC, and FSMC-to-SRAM. And boards driving LCD's use SRAM-to-FSMC.
FLASH/SRAM-to-FSMC DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)SRC_Const_Buffer; // FLASH/SRAM DMA_InitStructure.DMA_MemoryBaseAddr = (u32)Bank1_SRAM3_ADDR; // FSMC DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; DMA_InitStructure.DMA_BufferSize = 32; DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word; DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Word; DMA_InitStructure.DMA_Mode = DMA_Mode_Normal; DMA_InitStructure.DMA_Priority = DMA_Priority_High; DMA_InitStructure.DMA_M2M = DMA_M2M_Enable; FSMC-to-SRAM DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)Bank1_SRAM3_ADDR; // FSMC DMA_InitStructure.DMA_MemoryBaseAddr = (u32)DST_Buffer; // SRAM DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; DMA_InitStructure.DMA_BufferSize = 128; DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte; DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte; DMA_InitStructure.DMA_Mode = DMA_Mode_Normal; DMA_InitStructure.DMA_Priority = DMA_Priority_High; DMA_InitStructure.DMA_M2M = DMA_M2M_Enable;2011-05-17 04:54 AM
Thank you very much!