Question
Who's got success with DCMI ?
Posted on April 28, 2014 at 15:36
Hi there,
I am struggling capturing WXGA(1280x1024) images with STMF429 and ov2640 (from STM324x9I-EVAL1 board). SDRAM bandwidth looks just enough to cope with DCMI data and I often catch DMA FIFO errors (shall they be considered fatal, or is this possible to recover ?). In the case I simply missed an essential parameter, I give hereafter my DMA configuration, but I am very interested in your experiences with DCMI (successes or fails).DMA_DeInit(DMA2_Stream1);
DMA_StructInit(&dma_init); dma_init.DMA_Channel = DMA_Channel_1; dma_init.DMA_PeripheralBaseAddr = DCMI_BASE + 0x28; dma_init.DMA_Memory0BaseAddr = 0xc0000000; dma_init.DMA_BufferSize = DMA_STRIDE/4; dma_init.DMA_DIR = DMA_DIR_PeripheralToMemory; dma_init.DMA_PeripheralInc = DMA_PeripheralInc_Disable; dma_init.DMA_MemoryInc = DMA_MemoryInc_Enable; dma_init.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word; dma_init.DMA_MemoryDataSize = DMA_MemoryDataSize_Word; dma_init.DMA_Mode = DMA_Mode_Normal; dma_init.DMA_Priority = DMA_Priority_High; dma_init.DMA_FIFOMode = DMA_FIFOMode_Enable; dma_init.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull; dma_init.DMA_MemoryBurst = DMA_MemoryBurst_Single; dma_init.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; DMA_DoubleBufferModeCmd(DMA2_Stream1, ENABLE); DMA_DoubleBufferModeConfig(DMA2_Stream1, 0xc0000000+DMA_STRIDE, DMA_Memory_0); DMA_Init(DMA2_Stream1, &dma_init); DMA_ITConfig(DMA2_Stream1, DMA_IT_TC|DMA_IT_TE|DMA_IT_FE, ENABLE); Note that due to the limitation of DMA transfer counter, I splitted my 2*1280*1024 bytes images into 64 pieces, each 2*1280*16 bytes. Thanks.