背光调整详细文档

因为最近在做MSTAR648平台的项目,涉及到背光调节的问题,下面给出背光调节的详细文档.
背光公式修改:
[(Div+1)/ 12000000] * (Period+1) = 1/Pwm_Freq
Pwm_Freq = 12000000/[(Div+1)* (Period+1)]
(Period + 1) = [(12000000 / Pwm_Freq) / (Div+1)]
Period = [(12000000 / Pwm_Freq) / (Div+1)] -1
 

1,背光频率:如60HZ,80HZ,100HZ,120HZ。。。。400HZ。 (Pwm_Freq)

2,DivPWM:根据val = (12000000 / Pwm_Freq) 的结果决定:

     2.1 若val > 0xFFFF,则DivPWM的值为1;

     2.2 若val <= 0xFFFF, 则DivPWM的值为0;

3,Period = (12000000 / Pwm_Freq) / (DivPWM + 1) - 1;
 

4,屏参文件修改:

u32PeriodPWM = 0x927D; (Perio 转16进制)

panel:u32PeriodPWM

u32DutyPWM = 0x7F; (固定值)

u16DivPWM = 0x01; (DivPWM的值)

panel:u16DivPWM

bPolPWM = 1; #0:NON_INVERSE (极性 backlight Polarity 为 On)

u16MaxPWMvalue = 0x927D; (PeriodPWM)

panel:u16MaxPWMvalue

u16MinPWMvalue = 0x2000; (PeriodPWM * 占空比)

panel:u16MinPWMvalue

极性为0时,u16MaxPWMvalue 和 u16MinPWMvalue的值交换。
 

5,数据库factory.sql修改:

5.1,设置最大值:

tbl_FactoryExtern maxBacklightpwm 改成Period -1;

update tbl_FactoryExtern set maxBacklightpwm = Period -1;

5.2,

update tbl_NonLinearAdjust set u8OSD_V0=15000, u8OSD_V25=20000, u8OSD_V50=25000,u8OSD_V75=30000,u8OSD_V100=37499 where CurveTypeIndex=6;

上述u8OSD_V0 ~ u8OSD_V100取值方法:

将u16MinPWMvalue到u16MaxPWMvalue分为四段,计算出每段间隔,然后递增。

下面以 200HZ 占空比为30为例子 做一个说明:
背光调整详细文档_第1张图片
 

1,Pwm_Freq = 200HZ;

2,DivPWM: (12000000 / 200 = 60000) < 0xFFFF ==> DviPWM = 0;

3,Period = (12000000 / 200) / (0 + 1) - 1; ==> Period = 59999;

4,修改屏参文件:

u32PeriodPWM = 0xEA5F; period 转16进制

u32DutyPWM = 0x7F;

u16DivPWM = 0x00;

bPolPWM = 1; #0:NON_INVERSE

u16MaxPWMvalue = 0xEA5F; 此时极性为1,所以:u32PeriodPWM。

u16MinPWMvalue = 0x2000; Period * 占空比 ==> 60000 * 30% = 18000 ==> 0x4650

 

5,数据库:

5.1,update tbl_FactoryExtern set maxBacklightpwm = 59999; 60000 - 1;

5.2,u8OSD_V0 = 18000; 间隔: (60000-18000)/ 4 = 10500;

u8OSD_V25 = V0 + 10500 = 28500;

u8OSD_V50 = V25 + 10500 = 39000;

u8OSD_V75 = V25 + 10500 = 49500;

u8OSD_V100 = V100 + 10500 - 1 = 60000 -1 = 59999 ; 等于 maxBacklightpwm
以上是背光调节的完整内容 如有不懂的小伙伴欢迎私信我。

你可能感兴趣的:(背光调整详细文档)