1.首先图片如下,没有从第一行开始显示
2.我在vpfe_init配置中使用了中断,只有在设置VPFE_CCDC_VDINT = 0x01030000; //0x0103=258=576/2-5的时候才触发中断,设置代码如下:
void vpfe_init()
{
Uint32 video_buffer = 0x81000000;
Uint32 width;
Uint32 height;
width = 720;
height = 576;
VPFE_CCDC_SYN_MODE = 0x00032F84; // interlaced, with VD pority as negative
VPFE_CCDC_HD_VD_WID = 0;
VPFE_CCDC_PIX_LINES = 0x02CF023F;
// VPFE_CCDC_PIX_LINES = 0x02CF020D; //original
/*
* sph = 1, nph = 1440, according to page 32-33 of the CCDC spec
* for BT.656 mode, this setting captures only the 720×480 of the
* active NTSV video window
*/
VPFE_CCDC_HORZ_INFO = width << 1; // Horizontal lines
VPFE_CCDC_HSIZE_OFF = width << 1; // Horizontal line offset
VPFE_CCDC_VERT_START = 0; // Vertical start line
VPFE_CCDC_VERT_LINES = height >> 1; // Vertical lines
VPFE_CCDC_CULLING = 0xFFFF00FF; // Disable cullng
/*
* Interleave the two fields
*/
VPFE_CCDC_SDOFST = 0x00000249;
VPFE_CCDC_SDR_ADDR = video_buffer;
VPFE_CCDC_CLAMP = 0;
VPFE_CCDC_DCSUB = 0;
VPFE_CCDC_COLPTN = 0xEE44EE44;
VPFE_CCDC_BLKCMP = 0;
VPFE_CCDC_FPC_ADDR = 0x86800000;
VPFE_CCDC_FPC = 0;
/*FIXME!!! 中断触发 如果是两场的数据(每场的高度-5),每场就有一个vd中断,一帧是由两场组成的,两次中断算一帧 e2echina.ti.com/…/
VPFE_CCDC_VDINT = 0x01030000; //0x0103=258=576/2-5
VPFE_CCDC_ALAW = 0;
VPFE_CCDC_REC656IF = 0x00000003;
/*
* Input format is Cb:Y:Cr:Y, w/ Y in odd-pixel position
*/
VPFE_CCDC_CCDCFG = 0x00000800;
VPFE_CCDC_FMTCFG = 0;
VPFE_CCDC_FMT_HORZ = 0x000002D0;
VPFE_CCDC_FMT_VERT = 0x00000240;
// VPFE_CCDC_FMT_VERT = 0x0000020E;
VPFE_CCDC_FMT_ADDR0 = 0;
VPFE_CCDC_FMT_ADDR1 = 0;
VPFE_CCDC_FMT_ADDR2 = 0;
VPFE_CCDC_FMT_ADDR3 = 0;
VPFE_CCDC_FMT_ADDR4 = 0;
VPFE_CCDC_FMT_ADDR5 = 0;
VPFE_CCDC_FMT_ADDR6 = 0;
VPFE_CCDC_FMT_ADDR7 = 0;
VPFE_CCDC_PRGEVEN_0 = 0;
VPFE_CCDC_PRGEVEN_1 = 0;
VPFE_CCDC_PRGODD_0 = 0;
VPFE_CCDC_PRGODD_1 = 0;
VPFE_CCDC_VP_OUT = 0x04802D00;
// VPFE_CCDC_VP_OUT = 0x041A2D00;
VPFE_CCDC_PCR = 0x00000001; // Enable CCDC
}
3.image analyzer的设置为
4.摄像头标清,loopback程序中设置tvp5146模式为COMPONENT_IN,NTSC,请问我该怎么更改设置才能让图片显示正常呢?
johnny su:
回复 user1369122:
1.我试了PAL,图片显示正常,但是没有同步信号了(不影响进入VDINT0中断)
2.请问你是怎么根据分辨率判断出来是PAL制式的?望解答,不胜感激!
johnny su:
回复 Chris Meng:
应该是用tvp5146_rget( 0x02 );读取就可知道了
user6003186:
老哥,我最近也在搞图像处理,用的DM6437,想请教一下关于中断的事?方便加个扣扣啥的吗