您好,使用的是mesh sdk
低功耗模式功耗偏高,已排除外围电路,裸模块测试休眠后1.3mA
帮忙看下程序是不是还有哪个硬件未关闭
Code: Select all
TUYA_WAKEUP_SOURCE_BASE_CFG_T param;
param.source = TUYA_WAKEUP_SOURCE_GPIO;
param.wakeup_para.gpio_param.gpio_num = PIN_SCAN1;
if(Get_IO_STA(PIN_SCAN1)==TUYA_GPIO_LEVEL_LOW)
{param.wakeup_para.gpio_param.level = TUYA_GPIO_LEVEL_HIGH;}
else
{param.wakeup_para.gpio_param.level = TUYA_GPIO_LEVEL_LOW;}
tkl_wakeup_source_set(¶m);
param.source = TUYA_WAKEUP_SOURCE_GPIO;
param.wakeup_para.gpio_param.gpio_num = PIN_STA_LED;
if(Get_IO_STA(PIN_STA_LED)==TUYA_GPIO_LEVEL_LOW)
{param.wakeup_para.gpio_param.level = TUYA_GPIO_LEVEL_HIGH;}
else
{param.wakeup_para.gpio_param.level = TUYA_GPIO_LEVEL_LOW;}
tkl_wakeup_source_set(¶m);
//设置睡眠模式
tkl_cpu_sleep_mode_set(1, TUYA_CPU_SLEEP);
// tkl_cpu_sleep_mode_set(1, TUYA_CPU_DEEP_SLEEP);
//进入睡眠
tkl_cpu_allow_sleep();