50打静电导致弹出"充电移除"问题,尽量在短时间内恢复的sample code
0赞plug out时
A0700A24
将bit0~bit3的参数修改为0,其他bit位不变
plug in时
A0700A24
将bit0~bit3的值修改为3,其他bit位不变
如下sample code供您参考
bmt_task_main.c
//add include
#include "dcl_pmu_common_sw.h"
bmt_chr_indication()
{
......
//add define
kal_uint32 savedMask;
......
if (bmt_read_chr_status() == CHARGER_PLUG_IN)
{ .......
//add register setting @ plug in
savedMask = PMU_SaveAndSetIRQMask();
PMU_DRV_SetData16((DCL_UINT32)0xa0700a24,
(DCL_UINT16)0xF, ((kal_uint16)0x3));
PMU_RestoreIRQMask(savedMask);
//add register setting @ plug in
......
}
else if(bmt_read_chr_status() == CHARGER_PLUG_OUT)
{
......
//add register setting @ plug out
savedMask = PMU_SaveAndSetIRQMask();
PMU_DRV_SetData16((DCL_UINT32)0xa0700a24,
(DCL_UINT16)0xF, ((kal_uint16)0x0));
PMU_RestoreIRQMask(savedMask);
//add register setting @ plug out
......
} }
来自半导体社区