AnsweredAssumed Answered

DCMI Camera interface - max Resolution Camera

Question asked by omede.marco on Aug 29, 2011
Latest reply on Apr 23, 2014 by Mark Edwards
Hello at all...

I'm developing a camera that acquires a frame when it has a trigger and stores the data in the external ram with the DMA.
The camera has a relolution 1280 x 1024 pixel (each one of 16bit) and all pins signal are compatibles with the DCMI interface on the micro STM32F207.

I begun with the DCMI example in the ST-library but it's work with low resolution 320x240 pixel.

 I configured the DMA as below:

DMA_InitTypeDef DMA_InitStructure;
  /* Enable DMA2 clock */
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2, ENABLE);  
 
  DMA_ClearFlag(DMA2_Stream1, DMA_FLAG_FEIF1 | DMA_FLAG_DMEIF1 | DMA_FLAG_TEIF1 | DMA_FLAG_HTIF1 | DMA_FLAG_TCIF1);

  /* DMA2 Stream3  or Stream6 disable */
  DMA_Cmd(DMA2_Stream1, DISABLE);

  /* DMA2 Stream3  or Stream6 Config */
  DMA_DeInit(DMA2_Stream1);

  DMA_InitStructure.DMA_Channel = DMA_Channel_1;  
  DMA_InitStructure.DMA_PeripheralBaseAddr = DCMI_DR_ADDRESS;    
  DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t) pBufferPtr;
 
  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
  DMA_InitStructure.DMA_BufferSize = 1;
  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;  
  DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
  DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word;
  DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
  DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
  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;  
  DMA_Init(DMA2_Stream1, &DMA_InitStructure); 
  DMA_FlowControllerConfig(DMA2_Stream1, DMA_FlowCtrl_Peripheral);

My problem is that the max resolution that I can use is 128 x 1024 = 131072 pixel.

I suppose that the reason is the DMA counter limitations on 16 bit (65536) because each transfer on DMA is of 2 pixel (32 bit) and the max tranfer is 131072 pixel

The flow controller is configured to acquire the data controlled by the peripheral.

Could anyone suggest me any solution to increase the acquiring resolution?

Outcomes