最新mstar-LCD-PANEL-SETTING.doc
Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-datemstar-LCD-PANEL-SETTINGMStar Word Template-一. Timing简介在TV上, Timing的概念是指一组与液晶面板控制相关的时序(Timing), 主要包含以下几个主要的参数: Horizontal Total(简称HTT), Horizontal Sync Start(简称HSST), Horizontal Sync End(HSEND), Vertical Total(简称VTT), Vertical Sync Start(简称VSST), Vertical Sync End(VSEND). 另外还有Sync Width, Front porch, Back porch等, 也是H与V各一组. 还有有效数据起点DE Start, 终点DE End,也是H/V各一组. 以上所有参数构成了Timing的主体.以H方向为例, 以上数据的相互关系为:Horizontal Sync Width = HSEND - HSSTHorizontal Back porch = HTT HSENDHorizontal Front porch = HSEND H DE Start有效数据宽度: H Width =H DE end - H DE start, 通常我们讲到的panel Width即是这里的H Width. 因此,又有下面的数学公式:HTT = H Width + H Front porch + Horizontal Sync Width + Horizontal Back porch .V方向上各数据关系也对应相同.下图展示了一个V方向下完整的信号波形图, 各timing的位置关系如图所示.这里要说明的是, 以上所有timing都只是一个相互间的位置关系图, 并不意味着DE Start或Sync Start就是从0开始的.二. 如何在Mstar TV平台上由Register敲出想要的Timing我们的IC, 根据HW特点, Driver在设置上, H方向是以HSST为起始0点的, 即HSST=0, 其它参数根据前面的数学公式计算得出. V方向是以V DE Start为起始0点的, 即V DE Start=0, 其它参数根据前面的数学公式计算得出.由此得出我们的IC各timing位置关系及相应Register(16bit address mode), 如下图所示:由上图, 我们就可以根据想要调整的具体Timing信号, 找到相应的register调整即可.需要注意的是:A. 如果要想手动的调整timing, 必须进入manual timing mode,即REG_SC_BK10_1015 必须设1B. 由于计数起点不同,有的是从0开始算第一个点,因此在将计算结果写入register时,以下timing必须减1后,再写入Register中: H/V Total, H/V DE End, Hsync Width, VsyncEnd.例如对Timing 1920x108060hz时CEA要求:VTT=1125, VsyncWidth=5,V Back Porch=36, 则计算出来:VTT = 1125 = 0x465VsyncEnd = VTT - V Back Porch = 1089 = 0x441VsyncStart= VsyncEnd- VsyncWidth = 1084 = 0x43CV DE Start = 0V DE End = 1080由此, 下入register的值为: REG_SC_BK10_0D=0x464REG_SC_BK10_03=0x440REG_SC_BK10_02=0x43CREG_SC_BK10_06=0x00REG_SC_BK10_07=0x437三. 软件实现上怎么做1. 直接修改屏参按照所需要的timing信息, 直接填入屏参中对应项即可, 这里仅重点说明一下: 屏参参数配置时, 下面两个公式必须满足, 否则Driver就有可能设错Timing信息:m_wPanelHStart=m_ucPanelHSyncWidth+m_ucPanelHSyncBackPorchm_wPanelVStart=m_ucPanelVSyncWidth +m_ucPanelVBackPorch即屏参配置时, 除按照要求设定正确的H/V SyncWidth, back porch后, 还需要计算设定PanelHStart/PanelVStart, Driver需要该信息进行内部运算.下面给出三份按照CEA-861D要求配置的屏参参数, 供参考:1080P60hz:m_ucPanelHSyncWidth = 44;m_ucPanelHSyncBackPorch = 148;m_ucPanelVSyncWidth = 5;m_ucPanelVBackPorch = 36;m_wPanelHStart = 192;#44+148m_wPanelVStart = 41;#5+36m_wPanelWidth = 1920;m_wPanelHeight = 1080;m_wPanelMaxHTotal = 2360;m_wPanelHTotal = 2200;m_wPanelMinHTotal = 2020;m_wPanelMaxVTotal = 1200;m_wPanelVTotal = 1125;m_wPanelMinVTotal = 1090;m_dwPanelMaxDCLK = 164;m_dwPanelDCLK = 149;m_dwPanelMinDCLK = 120;m_dwPanelMaxSET = 0x20EA0E;m_dwPanelMinSET = 0x181568;m_ucOutTimingMode = 1;#E_PNL_CHG_VTOTAL; #E_PNL_CHG_DCLK = 0, #E_PNL_CHG_HTOTAL = 1, #E_PNL_CHG_VTOTAL = 2720P60hz:m_ucPanelHSyncWidth = 40;m_ucPanelHSyncBackPorch = 220;m_ucPanelVSyncWidth = 5;m_ucPanelVBackPorch = 20;m_wPanelHStart = 260;#44+148m_wPanelVStart = 25;#5+36m_wPanelWidth = 1280;m_wPanelHeight = 720;m_wPanelMaxHTotal = 2360;m_wPanelHTotal = 1650;m_wPanelMinHTotal = 2020;m_wPanelMaxVTotal = 1200;m_wPanelVTotal = 750;m_wPanelMinVTotal = 1090;m_dwPanelMaxDCLK = 164;m_dwPanelDCLK = 75;m_dwPanelMinDCLK = 120;m_ucOutTimingMode = 1;#E_PNL_CHG_VTOTAL; #E_PNL_CHG_DCLK = 0, #E_PNL_CHG_HTOTAL = 1, #E_PNL_CHG_VTOTAL = 2576P60hz:m_ucPanelHSyncWidth = 64;m_ucPanelHSyncBackPorch = 68;m_ucPanelVSyncWidth = 5;m_ucPanelVBackPorch = 39;m_wPanelHStart = 132;#44+148m_wPanelVStart = 44;#5+36m_wPanelWidth = 720;m_wPanelHeight = 576;m_wPanelMaxHTotal = 2360;m_wPanelHTotal = 864;m_wPanelMinHTotal = 2020;m_wPanelMaxVTotal = 1200;m_wPanelVTotal = 625;m_wPanelMinVTotal = 1090;m_dwPanelMaxDCLK = 164;m_dwPanelDCLK = 33;m_dwPanelMinDCLK = 120;m_ucOutTimingMode = 1;#E_PNL_CHG_VTOTAL; #E_PNL_CHG_DCLK = 0, #E_PNL_CHG_HTOTAL = 1, #E_PNL_CHG_VTOTAL = 22. 通过软件动态修改直接修改屏参的办法只能保证开机default时timing是正确的,一旦接入信号, 从新做了MApi_XC_SetPanelTiming后, timing就可能变化, 比如从60hz输出切换到50hz输出. 因此要想保证timing一直按照CEA要求输出, 还需要通过MApi_XC_SetExPanelInfo来指定50/60hz输出时的具体timing信息, 具体做法请参考MApi_XC_SetExPanelInfo相关文档.