ov9655 stm32f407igh6

2019-07-21 00:38发布

现在我想用stm32F4 采集ov9655 的RGB图像数据, 320*240的一屏下来就有150K,所以我先把采集到到的数据放到外部的 sram 里,下面是我 dma  传输的
一些配置,Bank1_SRAM3_ADDR 就是我挂的外部sram的首地址,  然后我那边显示的时候就是往lcd上连续送 320*240 个unsigned short 的color 数据,送到首地址也是Bank1_SRAM3_ADDR
但是我dma 配置 DMA_InitStructure.DMA_BufferSize 时为什么 要是 320*240*4  而不是320*240呢,  想不通。  改成320*240  显示就是不全的。LCD_DrawBmp565Pic显示接口因该是没问题的


uint16_t ex_sram_fb_buff[240*320] __attribute__((at(Bank1_SRAM3_ADDR)));


LCD_DrawBmp565Pic( 0, 0, 320 ,240 , (u16 *)ex_sram_fb_buff);


DMA_InitStructure.DMA_Channel = DMA_Channel_1;  
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)&DCMI->DR;//source add
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)Bank1_SRAM3_ADDR;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
DMA_InitStructure.DMA_BufferSize = 240*320*4;
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);//

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。