|
发表于 2021-6-27 16:16:55
9515 浏览 0 回复
Entering low power sleep mode in MT6261
本帖最后由 jawadi 于 2021-6-27 16:18 编辑
Hello,
I have been struggling to get the MT2503 to go to sleep mode to reduce battery power consumption. I found the following APIs and put them together in a function based on the original MediaTek SDK, but it doesn't work. I would appreciate it if you could give me more information toward this end.
//param related to sleep!
kal_uint8 slp_handle;
kal_uint8 slp_INT_handle;
kal_uint8 slp_MD2G;
kal_bool bIsSleepHandleInit = 0;
void disable_sleep_mode(void){
//config for get handler micro sleep
if (bIsSleepHandleInit == 0)
{
slp_handle = L1SM_GetHandle ();
slp_INT_handle=L1SM_IntGetHandle();
slp_MD2G = L1D_MD2G_PWD_GetHandle();
bIsSleepHandleInit = 1;
}
//micro wake up
L1SM_SleepDisable(slp_handle);
L1D_MD2G_PWD_Disable(slp_MD2G);
L1SM_IntSleepDisable(slp_INT_handle);
L1SM_Multi_SW_WakeUp();
}
void enable_Sleep_mode(void){
if (bIsSleepHandleInit == 0)
{
slp_handle = L1SM_GetHandle ();
slp_INT_handle=L1SM_IntGetHandle();
slp_MD2G = L1D_MD2G_PWD_GetHandle();
bIsSleepHandleInit = 1;
}
L1SM_SleepEnable(slp_handle);
L1D_MD2G_PWD_Disable(slp_MD2G);
L1SM_IntSleepEnable( slp_INT_handle );
}
|
|
|
|
|
|
|
登录或注册
|