AnsweredAssumed Answered

DMA STM32F4 with external SRAM and SSD1963 on FSMC

Question asked by p.charles on Apr 15, 2013
Latest reply on Apr 19, 2013 by waclawek.jan
Hello,

I'm trying to configure DMA2 stream 0 to do a transfer from external SRAM on the FSMC to a SSD1963 Display controller also on the FSMC. This is my code can't seem to get it working, I assume this is possible?  

  /* Enable DMA clock */
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2, ENABLE);
  
  DMA_DeInit(DMA2_Stream0);

  while (DMA_GetCmdStatus(DMA2_Stream0) != DISABLE)
  {
  }
 
  /* Configure DMA Stream */
  LCD_DMA_InitStructure.DMA_Channel = DMA_Channel_0; 
  LCD_DMA_InitStructure.DMA_PeripheralBaseAddr = 0x68000000;
  LCD_DMA_InitStructure.DMA_Memory0BaseAddr = 0x6C000002;  
  LCD_DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToMemory;
  LCD_DMA_InitStructure.DMA_BufferSize = 0x320;  
  LCD_DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable;
  LCD_DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable;
  LCD_DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
  LCD_DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
  LCD_DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
  LCD_DMA_InitStructure.DMA_Priority = DMA_Priority_High;
  LCD_DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable;        
  LCD_DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull;
  LCD_DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_INC4;
  LCD_DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_INC4;
  DMA_Init(DMA2_Stream0, &LCD_DMA_InitStructure);

  DMA_ClearFlag(DMA2_Stream0, DMA_IT_TC);
 
  /* Enable DMA Stream Transfer Complete interrupt */
  DMA_ITConfig(DMA2_Stream0, DMA_IT_TC, ENABLE);
 
  // DMA Stream enable
  DMA_Cmd(DMA2_Stream0, ENABLE);


Outcomes