Page 1 of 1

T3退出保活低功耗后PWM无法使用

Posted: 2025年 Jan 8日 15:45
by MrY

首次进入低功耗前PWM可以正常输出,进入低功耗后再退出,PWM无法输出
代码如下图左,串口打印如下图右

1736321602012.png

Re: T3退出保活低功耗后PWM无法使用

Posted: 2025年 Jan 8日 15:51
by chaser

退出低功耗后,重新初始化pwm,再试试。


Re: T3退出保活低功耗后PWM无法使用

Posted: 2025年 Jan 8日 16:49
by MrY
chaser 2025年 Jan 8日 15:51

退出低功耗后,重新初始化pwm,再试试。

你好,我在退出低功耗后增加tkl_pwm_init了PWM还是无法输出

Code: Select all

    OPERATE_RET rt = OPRT_OK;
    TUYA_PWM_BASE_CFG_T pwm_cfg = {
        .duty = 5000,
        .frequency = 10000,
        .polarity  = TUYA_PWM_NEGATIVE,
    };
    tkl_pwm_init(0, &pwm_cfg);
    tkl_pwm_start(0);

#if 1
    while(1)
    {
        /* 退出低功耗 */
        bk_printf("\r\nlpmgr_register\r\n");
        lpmgr_register(TY_LP_PWM);
        tkl_pwm_init(0, &pwm_cfg);
        pwm_cfg.duty = 5000;
        TUYA_CALL_ERR_LOG(tkl_pwm_info_set(0, &pwm_cfg));
        TUYA_CALL_ERR_LOG(tkl_pwm_start(0));
        tal_system_sleep(3000);

    /* 进入低功耗 */
    pwm_cfg.duty = 0;
    TUYA_CALL_ERR_LOG(tkl_pwm_info_set(0, &pwm_cfg));
    TUYA_CALL_ERR_LOG(tkl_pwm_start(0));
    bk_printf("\r\nlpmgr_unregister\r\n");
    lpmgr_unregister(TY_LP_PWM);
    tal_system_sleep(3000);
}

Re: T3退出保活低功耗后PWM无法使用

Posted: 2025年 Jan 9日 16:45
by chaser

反馈的问题在跟进了,有结论会及时回复。


Re: T3退出保活低功耗后PWM无法使用

Posted: 2025年 Jan 16日 16:48
by chaser

关于退出低功耗后pwm无输出问题,可以先合入附件的patch,进行开发。