AnsweredAssumed Answered

How to transfer the DCMI interface data to Uart by using PSRAM and DMA

Question asked by VenkatKishore on Feb 15, 2014
Latest reply on Feb 15, 2014 by Clive One
hi,
    I have used STM32F417 processor with PSRAM 64 MB size and OV5640 Camera.
I want to send the camera data  from dma to PSRAM then PSRAM to UART4.
How to configure the DMA for this above concept.

Present dma settings

uint8_t frame_buffer[640*480*2];
 
 DMA_InitStructure.DMA_Channel = DMA_Channel_1;  
//    DMA_InitStructure.DMA_PeripheralBaseAddr =  (uint32_t)(DCMI_BASE + 0x28); //vv added
  DMA_InitStructure.DMA_PeripheralBaseAddr =  (uint32_t)(DCMI_BASE); //vv added 0x50050000
 // DMA_InitStructure.DMA_Memory0BaseAddr = FSMC_LCD_ADDRESS;  //vv
  DMA_InitStructure.DMA_Memory0BaseAddr= (uint32_t)frame_buffer; //vv added
  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
/* //DMA
  DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToMemory;
*/
 // DMA_InitStructure.DMA_BufferSize=frame_buffer;
  DMA_InitStructure.DMA_BufferSize = 0x25800; //(640*480*2)/4
  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
  DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable;
  DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word;
  DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
  DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;   //DMA_Mode_Normal Note:vv check this mode  0r
  DMA_InitStructure.DMA_Priority = DMA_Priority_High;
  DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable;
  DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;
  DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
  DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;


how to link  DMA_PeripheralBaseAddr to PSRAM link,and i want to capture images snapshot  10 ms intervals and store this images to psram and send images one by one PSRAM to uart4.
PSRAM  Chip select address is  FSMC_Bank1_NORSRAM2.
my requirements is camera datas need to send via uart ,how to configure this Data flow for following method. DMA to PSRAM and PSRAM to UART4.

Thanks by,
Venkat

Outcomes