为什么我配置的DCMI接收TVP5150传输到内存中数据一直是2048位,PAL制信号输入好像不是2048啊,是720*576,开的缓存是4K,数据来源是视频信号接入TVP5150传输出来的!求高手解答?我配置TVP5150裁剪也没什么反应?
配置方式如下:
DCMI配置如下:
DCMI_InitStructure.DCMI_CaptureMode = DCMI_CaptureMode_Continuous;
DCMI_InitStructure.DCMI_SynchroMode = DCMI_SynchroMode_Hardware;
DCMI_InitStructure.DCMI_PCKPolarity = DCMI_PCKPolarity_Falling;
DCMI_InitStructure.DCMI_VSPolarity = DCMI_VSPolarity_High;
DCMI_InitStructure.DCMI_HSPolarity = DCMI_HSPolarity_High;
DCMI_InitStructure.DCMI_CaptureRate = DCMI_CaptureRate_All_Frame;
DCMI_InitStructure.DCMI_ExtendedDataMode = DCMI_ExtendedDataMode_8b;
DCMI_Init(&DCMI_InitStructure);
DMA配置如下:
DMA_InitStructure.DMA_Channel = DMA_Channel_1; //选择DMA通道
DMA_InitStructure.DMA_PeripheralBaseAddr = DCMI_DR_ADDR;//DCMI_BASE; //DMA选择外设基址
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&video_dma_buf[0]; //DMA数据传入内存的基址
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory; //外设到存储器
DMA_InitStructure.DMA_BufferSize =4000; //空间大小 传送最大数据空间
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;
TVP5150数据:
{ /* 0x00 1*/
0x00,0x00 //视频输入源选择寄存器
},
{ /* 0x01 2*/
0x01,0x8f //模拟通道控制寄存器
},
{ /* 0x02 3*/
0x02,0x00 //操作模式控制寄存器
},
{ /* 0x03 4*/
0x03,0x7f //杂项控制寄存器 //0d
},
{ /* 0x04 5*/
0x04,0xc0
},
{ /* 0x06 6*/
0x06,0x10
},
{ /* 0x07 7*/
0x07,0x40
},
{ /* 0x08 8*/
0x08,0x00
},
{ /* 0x09 9*/
0x09,0x80
},
{ /* 0x0a 10*/
0x0a,0x80
},
{ /* 0x0b 11*/
0x0b,0x00
},
{ /* 0x0c 12*/
0x0c,0x80
},
{ /* 0x0d 13*/
0x0d,0x40 //47
},
{ /* 0x0e 14*/
0x0e,0x00
},
{ /* 0x0f 15*/
0x0f,0x08 //0x08
},
{ /* 0x11 16*/
0x11,0x00
},
{ /* 0x12 17*/
0x12,0x00
},
{ /* 0x13 18*/
0x13,0x00
},
{ /* 0x14 19*/
0x14,0x00
},
{ /* 0x15 20*/
0x15,0x01
},
{ /* 0x16 21*/
0x16,0x80
},
{ /* 0x18 22*/
0x18,0x00
},
{ /* 0x19 23*/
0x19,0x00
},
{ /* 0x1a 24*/
0x1a,0x0c
},
{ /* 0x1b 25*/
0x1b,0x14
},
{ /* 0x1c 26*/
0x1c,0x00
},
{ /* 0x1d 27*/
0x1d,0x00
},
{ /* 0x1e 28*/
0x1e,0x00
},
{ /* 0x28 29*/
0x28,0x00
},
{ /* 0x2e 30*/
0x2e,0x0f
},
{ /* 0x2f 31*/
0x2f,0x01
},
{ /* 0xbb 32*/
0xbb,0x00
},
{ /* 0xc0 33*/
0xc0,0x00
},
{ /* 0xc1 34*/
0xc1,0x00
},
{ /* 0xc2 35*/
0xc2,0x04
},
{ /* 0xc8 36*/
0xc8,0x80
},
{ /* 0xc9 37*/
0xc9,0x00
},
{ /* 0xca 38*/
0xca,0x00
},
{ /* 0xcb 39*/
0xcb,0x4e
},
{ /* 0xcc 40*/
0xcc,0x00
},
{ /* 0xcd 41*/
0xcd,0x01
},
{ /* 0xcf 42*/
0xcf,0x00
},
{ /* 0xd0 43*/
0xd0,0x00
},
{ /* 0xfc 44*/
0xfc,0x7f
}
一周热门 更多>