用stm32f4,直接显示,用的是点子的代码
DMA_InitStructure.DMA_Channel = DMA_Channel_1; //?¨??1 DCMI?¨??
DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)&DCMI->DR;
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)lcd_ram;//LCD地址
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;//???è???????÷????
DMA_InitStructure.DMA_BufferSize = DMA_BufferSize; //??????????
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;//???è·?????????
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable;//?????÷????????
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Word;//???è?????¤??:32??
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; //FIFO????
DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full;//??????FIFO
DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;//???è??·?????????
DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;//?????÷??·?????????
DMA_Init(DMA2_Stream1, &DMA_InitStructure); //??????DMA Stream*/
DMA_Init(DMA2_Stream1, &DMA_InitStructure);
下面是DCMI设置
DCMI_InitStructure.DCMI_CaptureMode = DCMI_CaptureMode_Continuous; //????????
DCMI_InitStructure.DCMI_CaptureRate = DCMI_CaptureRate_All_Frame; //????????
DCMI_InitStructure.DCMI_ExtendedDataMode = DCMI_ExtendedDataMode_8b; / /8??????????
DCMI_InitStructure.DCMI_HSPolarity = DCMI_HSPolarity_Low; //HSYNC ?????????§
DCMI_InitStructure.DCMI_PCKPolarity = DCMI_PCKPolarity_Rising; //PCLK ?????????§
DCMI_InitStructure.DCMI_SynchroMode = DCMI_SynchroMode_Hardware; //????????HSYNC,VSYNC
DCMI_InitStructure.DCMI_VSPolarity = DCMI_VSPolarity_Low; //VSYNC ?????????§
DCMI_Init(&DCMI_InitStructure);
直接给LCD地址显示,LCD显示的乱七八糟,不成图像。但是如果用数组来显示160x120的话,是可以出视频。
是不是这样直接给数据每次都多了几个数据,把LCD扫描弄乱了?还是设置不对?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>