搜索

6

主题

21

帖子

198

积分

注册会员

Rank: 2

积分
198
发表于 2021-6-27 16:16:55 6644 浏览 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 );
}


回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


登录或注册
快速回复 返回顶部 返回列表