mt2503 如何缩短开机时间,让背光瞬间亮起来
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
MT6260的开机流程为:按下power key -> BOOTROM -> Bootloader -> Bootloader_ext -> MAUI系统。
按压power key -> BOOTROM -> Bootloader这个时间点是芯片设计固定的,SW无法修改。
目前刷mtk logo是在MAUI系统的zimage_dispaly_logo()函数内进行,点LCD背光,刷LCD屏。
如果让要背光瞬间亮起来,即将点LCD背光,ISINK打开提前,最多只能提前到Bootloader_ext里面,经验证,目前感觉能提前2s。
[SOLUTION]
1. makefile
BLRESERVEDSIZE_AUTOCONFIG = TRUE
2. bl_Main.c
void ExtBootloader(void)
{
#ifdef __DRV_EXT_CHARGER_DETECTION__
extern void MU_BootUp_Init(void);
#endif /* __DRV_EXT_CHARGER_DETECTION__ */
custom_bl_enable(ISINK0, DCL_TRUE);//增加
custom_bl_enable(ISINK1, DCL_TRUE);//增加
custom_bl_enable(ISINK2, DCL_TRUE);//增加
custom_bl_enable(ISINK3, DCL_TRUE);//增加
…
}
注意:MT6261下只有ISINK0和ISINK1
3. dcl_pmu6260.c
请在#endif //#if (defined(PMU_6260_REG_API))这一行前增加如下函数custom_bl_enable(),最终如下:
#if (defined(PMU_6260_REG_API))
…
void custom_bl_enable(PMU_ISINK_LIST_ENUM i, DCL_BOOL enable)
{
PMU_CTRL_ISINK_SET_STEP_DOUBLE IsinkSetStepDouble;
PMU_CTRL_ISINK_STEP_ENUM isink_step;
DCL_UINT16 val;
DCL_HANDLE handle;
handle = DclPMU_Open(DCL_PMU, FLAGS_NONE);
pmu6260_cust_isink_en = enable;
//pmu_cust_isink_step = step;
if (pmu6260_cust_isink_en)
{
// set isink double bit
if (pmu_cust_isink_step > ISINK_STEP_24_MA)
{
IsinkSetStepDouble.isink = (PMU_ISINK_LIST_ENUM)i;
IsinkSetStepDouble.enable = DCL_TRUE;
dcl_pmu6260_control_handler(handle, ISINK_SET_STEP_DOUBLE, (DCL_CTRL_DATA_T
*)&IsinkSetStepDouble);
}
else
{
IsinkSetStepDouble.isink = (PMU_ISINK_LIST_ENUM)i;
IsinkSetStepDouble.enable = DCL_FALSE;
dcl_pmu6260_control_handler(handle, ISINK_SET_STEP_DOUBLE, (DCL_CTRL_DATA_T
*)&IsinkSetStepDouble);
}
// set isink step
if (pmu_cust_isink_step > ISINK_STEP_24_MA)
{
isink_step = (PMU_CTRL_ISINK_STEP_ENUM)(pmu_cust_isink_step >> 1);
}
else
{
isink_step = pmu_cust_isink_step;
}
val=PMU_Parameter_to_Value(ENC(ISINK_SET_STEP, ALLMOD), isink_step);
if (val!=PARAMETER_UNKNOWN)
pmu_set_isink((PMU_ISINK_LIST_ENUM)i, ISINK_STEP, val);
}
// set isink enable
pmu_set_isink((PMU_ISINK_LIST_ENUM)i, ISINK_MODE, ISINK_REGISTER_CTRL_MODE);
pmu_set_isink((PMU_ISINK_LIST_ENUM)i,ISINK_EN,(DCL_UINT32)enable);
DclPMU_Close(handle);
}
#endif //#if (defined(PMU_6260_REG_API))
MT6260的开机流程为:按下power key -> BOOTROM -> Bootloader -> Bootloader_ext -> MAUI系统。
按压power key -> BOOTROM -> Bootloader这个时间点是芯片设计固定的,SW无法修改。
目前刷mtk logo是在MAUI系统的zimage_dispaly_logo()函数内进行,点LCD背光,刷LCD屏。
如果让要背光瞬间亮起来,即将点LCD背光,ISINK打开提前,最多只能提前到Bootloader_ext里面,经验证,目前感觉能提前2s。
[SOLUTION]
1. makefile
BLRESERVEDSIZE_AUTOCONFIG = TRUE
2. bl_Main.c
void ExtBootloader(void)
{
#ifdef __DRV_EXT_CHARGER_DETECTION__
extern void MU_BootUp_Init(void);
#endif /* __DRV_EXT_CHARGER_DETECTION__ */
custom_bl_enable(ISINK0, DCL_TRUE);//增加
custom_bl_enable(ISINK1, DCL_TRUE);//增加
custom_bl_enable(ISINK2, DCL_TRUE);//增加
custom_bl_enable(ISINK3, DCL_TRUE);//增加
…
}
注意:MT6261下只有ISINK0和ISINK1
3. dcl_pmu6260.c
请在#endif //#if (defined(PMU_6260_REG_API))这一行前增加如下函数custom_bl_enable(),最终如下:
#if (defined(PMU_6260_REG_API))
…
void custom_bl_enable(PMU_ISINK_LIST_ENUM i, DCL_BOOL enable)
{
PMU_CTRL_ISINK_SET_STEP_DOUBLE IsinkSetStepDouble;
PMU_CTRL_ISINK_STEP_ENUM isink_step;
DCL_UINT16 val;
DCL_HANDLE handle;
handle = DclPMU_Open(DCL_PMU, FLAGS_NONE);
pmu6260_cust_isink_en = enable;
//pmu_cust_isink_step = step;
if (pmu6260_cust_isink_en)
{
// set isink double bit
if (pmu_cust_isink_step > ISINK_STEP_24_MA)
{
IsinkSetStepDouble.isink = (PMU_ISINK_LIST_ENUM)i;
IsinkSetStepDouble.enable = DCL_TRUE;
dcl_pmu6260_control_handler(handle, ISINK_SET_STEP_DOUBLE, (DCL_CTRL_DATA_T
*)&IsinkSetStepDouble);
}
else
{
IsinkSetStepDouble.isink = (PMU_ISINK_LIST_ENUM)i;
IsinkSetStepDouble.enable = DCL_FALSE;
dcl_pmu6260_control_handler(handle, ISINK_SET_STEP_DOUBLE, (DCL_CTRL_DATA_T
*)&IsinkSetStepDouble);
}
// set isink step
if (pmu_cust_isink_step > ISINK_STEP_24_MA)
{
isink_step = (PMU_CTRL_ISINK_STEP_ENUM)(pmu_cust_isink_step >> 1);
}
else
{
isink_step = pmu_cust_isink_step;
}
val=PMU_Parameter_to_Value(ENC(ISINK_SET_STEP, ALLMOD), isink_step);
if (val!=PARAMETER_UNKNOWN)
pmu_set_isink((PMU_ISINK_LIST_ENUM)i, ISINK_STEP, val);
}
// set isink enable
pmu_set_isink((PMU_ISINK_LIST_ENUM)i, ISINK_MODE, ISINK_REGISTER_CTRL_MODE);
pmu_set_isink((PMU_ISINK_LIST_ENUM)i,ISINK_EN,(DCL_UINT32)enable);
DclPMU_Close(handle);
}
#endif //#if (defined(PMU_6260_REG_API))