WXU模组的烧录软件及定时唤醒功能

Wi-Fi 设备、Wi-Fi 低功耗设备、Wi-Fi BLE 双模设备、Ethernet设备、Ethernet+Wi-Fi设备等
Post Reply
wangjie1
Posts: 62

1 wxu模组烧录软件哪里下载?系统包里面没有,不至于每次烧录都需要授权一次吧 :D
2 有没有定时唤醒的例程,模组进去deepsleep模式后,持续是5个小时后自动定时器唤醒


Tags:
JSHANG
Posts: 39

Re: WXU模组的烧录软件及定时唤醒功能

Hi, wangjie1

  1. 模组烧录软件在开发包该目录下:vendor\xr806\xr806_os\tools\phoenixMC.exe;将模组的PB02拉低进入烧录模式;
  2. 将附件tkl_wakeup.c 替换目录\vendor\xr806\tuyaos\tuya_os_adapter\src\driver\tkl_wakeup.c,该版本已实现中断定时和GPIO唤醒功能。
    (a).中断定时唤醒实列:
    TUYA_WAKEUP_SOURCE_BASE_CFG_T param;
    memset(&param, 0, sizeof(param));
    param.source = TUYA_WAKEUP_SOURCE_TIMER;
    param.wakeup_para.timer_param.ms = 60000;
    tkl_wakeup_source_set(&param); /* 设置中断定时器进入deep sleep休眠 */

(b).配置GPIO唤醒实列:
TUYA_WAKEUP_SOURCE_BASE_CFG_T param;
memset(&param, 0, sizeof(param));
param.source = TUYA_WAKEUP_SOURCE_GPIO;
param.wakeup_para.gpio_param.gpio_num = 19; /* 设置gpio num 19 唤醒 /
param.wakeup_para.gpio_param.level = 1; /
配置高电平有效 /
tkl_wakeup_source_set(&param); /
配置GPIO唤醒 /
tkl_cpu_sleep_mode_set(1,TUYA_CPU_DEEP_SLEEP); /
进入deep sleep 休眠 */
WXU模组深度休眠,支持唤醒的GPIO有:PA12,PA13,PA19,PA20,PA23

Thanks,

Attachments
tkl_wakeup.c
中断定时唤醒和GPIO唤醒实现函数
(3.52 KiB) Downloaded 166 times
Post Reply