2013-12-03 09:21 AM
Hello! I've successfully started an OV2640 camera, transferring 320x240 image to SDRAM on STM32F32439I-EVAL board. I want to make a bigger picture (640x480 for awesome onboard screen), but DMA transfer only supports 65536 items. How can i transfer a big pictures to SDRAM memory from DCMI interface on this board?
DMA_DeInit(DMA2_Stream1);DMA_InitStructure.DMA_Channel = DMA_Channel_1;DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)&DCMI->DR; DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)LCD_FRAME_BUFFER;DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;DMA_InitStructure.DMA_BufferSize = (uint32_t)38400; //Number of 32 bit counts: (320*240 pixels) /(2 pixels per 32 bit word) ;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_Word;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_DoubleBufferModeConfig(DMA2_Stream1, CAMERA_FRAME2_ADDRESS, DMA_Memory_1);DMA_DoubleBufferModeCmd(DMA2_Stream1,ENABLE);2013-12-03 09:33 AM
Perhaps by chaining buffers at the DMA interrupt?