对于助视器7inch 液晶配置调试记录
DSP芯片:DM6437
LCD芯片:AT070TN92
LCD模式在HV模式,数据接口为RGB888模式。利用VPBE 中的LCD controller传输数据。
VPBE中采集的数据为YUV422。LCD controller 能够将YUV格式转化为RGB格式。其中YUV格式
是从OSD模块从读取的。
配置的格式如下:
#define BASEP_X 46
#define BASEP_Y 23
void vpbe_init( Uint32 buffer0, Uint32 buffer1, Uint32 width, Uint32 height);
{
VPSS_CLK_CTRL
= 0x000000019; // Enable DAC and VENC clock, both at 27 MHz
VPBE_PCR
= 0; // No clock div, clock enable
#if 1
/*
* Setup OSD
*/
VPBE_OSD_MODE
= 0x0000003f; // Blackground color blue using clut in ROM0
VPBE_OSD_OSDWIN0MD
= 0; // Disable both osd windows and cursor window
VPBE_OSD_OSDWIN1MD
= 0;
VPBE_OSD_RECTCUR
= 0;
VPBE_OSD_VIDWIN0OFST = width >> 4;
VPBE_OSD_VIDWIN0ADR = buffer0;
// VPBE_OSD_PPVWIN0ADR = buffer1;
VPBE_OSD_BASEPX
= BASEP_X;
VPBE_OSD_BASEPY
= BASEP_Y;
VPBE_OSD_VIDWIN0XP
= 0;
VPBE_OSD_VIDWIN0YP
= 0; //why is double of Xp?
VPBE_OSD_VIDWIN0XL
= width;
//VPBE_OSD_VIDWIN0YL = height >> 1;
VPBE_OSD_VIDWIN0YL
= height;
VPBE_OSD_MISCCTL
= 0; //change the color if set bit 7 ,but don't know the principle
// VPBE_OSD_MISCCTL
= 0x80;
VPBE_OSD_VIDWINMD
= 0x00000001; // Disable vwindow 1 and enable vwindow 0
// Field mode with no up-scaling
#endif
//VPBE_VENC_VMOD = 0x00000043; // Standard PAL interlaced output
VPBE_VENC_VMOD
= 0x00002053|(0 << 4); // Standard PAL interlaced output
VPBE_VENC_VIDCTL = 0x00002000|(1 << 4); //输出极性反了一下。不知是否与硬件有关
VPBE_VENC_LCDOUT = 0x00000001;
VPBE_VENC_DCLKCTL = 0x0000001;
VPBE_VENC_DCLKPTN0 = 0x1;
//
VPBE_VENC_HSPLS = 1*2;// 40*2
//必须以ENC_Clock 同步,而配置的ENC_Clock 为54M ,则行需要乘以2
VPBE_VENC_HINT = 862*2-1;// 1056*2 - 1
VPBE_VENC_HSTART =
46*2; // (40 + 4)*2
VPBE_VENC_HVALID = 800*2; // 800*2
VPBE_VENC_VSPLS = 1;// 10
VPBE_VENC_VINT = 510-1;//0x20C; // 525 - 1
VPBE_VENC_VSTART =
23;//0xc; // 10 + 2
VPBE_VENC_VVALID = 480;//0x1E0; // 480
// VPBE_VENC_HSDLY = 1;
// VPBE_VENC_VSDLY = 1;
VPBE_VENC_SYNCCTL = 0xf|(0<<11); //Set HSYNC, VSYNC as active low
VPBE_VENC_RGBCTL = 0x0;
VPBE_VENC_VDPRO
= 0 << 8|(0<<9)|(0<<11);
VPBE_VENC_DACTST
= 0|(0xf << 12); //DAC Power-down mode
VPBE_VENC_DACSEL
= 0x000000;
}