1.我用ty_iot_sdk_bk7231nl_BK7231NL_2.3.1-beta.14的sdk,做的温湿度计,我在设备休眠时,切换温标,重新唤醒设备后并没有收到下发的温标dp;
VOID dev_obj_dp_cb(IN CONST TY_RECV_OBJ_DP_S dp)
{
PR_NOTICE("app_send dp_cnt:%d",dp->dps_cnt);
OPERATE_RET op_ret = OPRT_OK;
UINT_T dp_index = 0;
UINT_T app_send_dp_num = 1;
DEV_DP_TYPE_E dpid_type = DP_NOT_EXIST;
for(dp_index = 0;dp_index < app_send_dp_num;dp_index++)
{
switch (dp->dps[dp_index].dpid)
{
case 9:
PR_DEBUG("DPID_UNIO_CNT:%d",dp->dps[dp_index].value.dp_bool);
Temp_Unio_Sta = dp->dps[dp_index].value.dp_bool;
break;
default:
break; }
}
op_ret = tuya_hard_upload_wb();
if (OPRT_OK != op_ret)
{
PR_ERR("[%s] tuya_hard_upload_all_data fail,fail_num:%d",op_ret);
}
return;}
2.我想除了用gpio唤醒以外,加上4小时的定时器唤醒,但加上之后,休眠就唤醒不了了;
/
bk_deep_ctrl_param.wake_up_way = PS_DEEP_WAKEUP_GPIO|PS_DEEP_WAKEUP_RTC;
bk_deep_ctrl_param.gpio_index_map = (1 << TY_GPIOA_16)|(1 << TY_GPIOA_20);
bk_deep_ctrl_param.gpio_edge_map = 1; // 0:high level wakeup,1:low level wakeup.
bk_deep_ctrl_param.gpio_stay_lo_map = (1 << TY_GPIOA_16)|(1 << TY_GPIOA_20);
bk_deep_ctrl_param.sleep_time = 14400;
bk_deep_ctrl_param.lpo_32k_src = LPO_SELECT_ROSC;
*/
Code: Select all
bk_deep_ctrl_param.wake_up_way = PS_DEEP_WAKEUP_GPIO;
bk_deep_ctrl_param.gpio_index_map = (1 << TY_GPIOA_16)|(1 << TY_GPIOA_20);
bk_deep_ctrl_param.gpio_edge_map = 1; // 0:high level wakeup,1:low level wakeup.
bk_deep_ctrl_param.gpio_stay_lo_map = (1 << TY_GPIOA_16)|(1 << TY_GPIOA_20);
上面被屏蔽部分的是异常的代码,下面部分是gpio唤醒正常的代码,大佬帮忙看看啥问题
附件图片是后台的设置