cancel
Showing results for 
Search instead for 
Did you mean: 

Can STM32F103 transfer data between internal sram and FMSC by DMA?

271472827
Associate
Posted on June 12, 2010 at 13:38

Can STM32F103 transfer data between internal sram and FMSC by DMA?

3 REPLIES 3
chikos332
Associate II
Posted on May 17, 2011 at 13:54

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.
Posted on May 17, 2011 at 13:54

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;

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
271472827
Associate
Posted on May 17, 2011 at 13:54

Thank you very much!