上面5张图即为LCD的相关信息。
采用HV模式时序设置TIMH、TIMV相关寄存器,出现液晶屏花屏。全部是彩色竖线。
static void AT056LCD_TimingInit(void)
{
pConfig.big_endian_byte = 0;
pConfig.big_endian_pixel = 0;
pConfig.lcd_bpp = LCD_BPP_16;
pConfig.lcd_dual = 0;// Single Panel
pConfig.lcd_type = LCD_TFT;
pConfig.panel_clk = 26000000;
/* Setup LCD DE Mode Timing */
hConfig.hbp = 160;//134;
hConfig.hfp = 0;//16;
hConfig.hsw = 0;//10;
hConfig.ppl = 640;
vConfig.lpp = 480;
vConfig.vbp = 45;//11;
vConfig.vfp = 0;//32;
vConfig.vsw = 0;//2;
polarity.acb = 0;//if TFT,ACB invalid
polarity.active_high = 0;
polarity.cpl = 640;
pConfig.hConfig = hConfig;
pConfig.vConfig = vConfig;
pConfig.polarity = polarity;
pConfig.lcd_panel_upper = VRAM_ADDR_PHYS;
}
void AT056LCD_Init(void)
{
/* Set AHB priority : LCD(3) > D-cache(2) > I-cache(1) */
MATRIX_ARB = (1<<0)|(2<<2)|(3<<10);
/* Set LCD Pin,use DE mode */
PINSEL_ConfigPin(2,12,5); // VD3,R0
PINSEL_ConfigPin(2,6,7); // VD4,R1
PINSEL_ConfigPin(2,7,7); // VD5,R2
PINSEL_ConfigPin(2,8,7); // VD6,R3
PINSEL_ConfigPin(2,9,7); // VD7,R4
PINSEL_ConfigPin(1,20,7); // VD10,G0
PINSEL_ConfigPin(1,21,7); // VD11,G1
PINSEL_ConfigPin(1,22,7); // VD12,G2
PINSEL_ConfigPin(1,23,7); // VD13,G3
PINSEL_ConfigPin(1,24,7); // VD14,G4
PINSEL_ConfigPin(1,25,7); // VD15,G5
PINSEL_ConfigPin(2,13,7); // VD19,B0
PINSEL_ConfigPin(1,26,7); // VD20,B1
PINSEL_ConfigPin(1,27,7); // VD21,B2
PINSEL_ConfigPin(1,28,7); // VD22,B3
PINSEL_ConfigPin(1,29,7); // VD23,B4
PINSEL_ConfigPin(2,2,7); // DCLK
PINSEL_ConfigPin(2,0,7); // DSIP(power)
PINSEL_ConfigPin(2,4,7); // DataEn
AT056LCD_TimingInit();
LCD_Init(&pConfig);
LCD_Enable(1);
}
|