T1 3.11.31 本地音乐模式运行时adc报错

Wi-Fi 设备、蜂窝设备、WuKongAI、开发板、TuyaOS 移植等


Post Reply
Sneak4207
Posts: 6

模块:T1-U-HL
SDK:T1-CHL_TUYAOS-3.11.31
开发包:tuyaos_wf_t1_lig-tuyaos_t1_light_ty 1.0.6

打开本地音乐功能,相关宏开关定义如下

Code: Select all

#define ENABLE_DIMMER_REAL_MUSIC 1
#define DIMMER_REAL_MUSIC_DP 27
#define ENABLE_DIMMER_LOCAL_MUSIC 1
#define DIMMER_LOCAL_MUSIC_DP 42
#define LIGHT_MIC_NAME "mic_dev"
#define LIGHT_ADC_NUM 0
#define LIGHT_ADC_PIN 20
#define LIGHT_ADC_MAX 4096
#define LIGHT_MIC_VOLTAGE_RANGE 2400
#define LIGHT_MIC_VTH_MIN 8
#define LIGHT_MIC_VTH_MAX 41
#define LIGHT_MIC_VPROD 16

通过按键或面板进入预设的本地音乐模式(比如Rock)后,音乐模式能够正常运行,触摸麦克风能够看到颜色快速切换。但是在日志中,会观察到adc采样报错时有发生,日志如下

[12-16 11:58:57 ty D][42d6][tuya_devos_health.c:71] feed watchdog
[12-16 11:58:58 ty D][426a][mqc_app.c:409] Rev MQTT:{"data":{"dps":{"21":"music"}},"protocol":5,"t":1765857537}
[12-16 11:58:58 ty D][426a][sf_mqc_cb.c:11] Rev DP Cmd
[12-16 11:58:58 ty D][436b][smart_frame.c:1277] Rev Cmd 1, data:0x427ddc
[12-16 11:58:58 ty D][436b][ty_app_lig_trigger_dp.c:474] ## dp_cnt:1,cmd_tp:1,dtt_tp:0 ##,
[12-16 11:58:58 ty N][436b][ty_app_lig_trigger_dp.c:120] obj dpid:21
[12-16 11:58:58 ty D][43a8][ty_app_lig_event.c:108] event id :0X6 cluster:0 ->>>>
[12-16 11:58:58 ty D][43a8][ty_app_lig_evt_timer.c:325] all adv timer stop
[12-16 11:58:58 ty D][43a8][app_dimmer_paint_method.c:2897] stop stepless
[12-16 11:58:58 ty D][43a8][smart_frame.c:4366] rept chan:1
[12-16 11:58:58 ty D][43a8][smart_frame.c:428] dp<21> check. need_update:0 pv_stat:3 trig_t:0 dp_rept_type:0 force_send:0 prop_tp:3
[12-16 11:58:58 ty D][43a8][smart_frame.c:582] is_need_update:1, is_dp_passive:0, pv_stat:2, uling_cnt:0
[12-16 11:58:58 ty D][43a8][smart_frame.c:2801] dp rept_type:0, data:{"21":"music"}
[12-16 11:58:58 ty D][43a8][mqc_app.c:873] Send MQTT Msg.P:4 N:49339 Q:1 Data:{"dps":{"21":"music"}}
[12-16 11:58:58 ty D][43a8][tuya_svc_mqtt_client.c:455] packet id: 21
[12-16 11:58:58 ty D][43a8][app_light_mode.c:159] set mode:3
[12-16 11:58:58 ty D][426a][smart_frame.c:2342] msg_data:{"dps":{"21":"music"}}, mqtt async dp cb:0
[12-16 11:58:58 ty D][426a][smart_frame.c:224] set short dp rate rule, dpID:21, curr_t:1765857538, rept_cnt:2.
[12-16 11:58:58 ty D][426a][smart_frame.c:232] set long dp rate rule, dpID:21, curr_t:1765857538, rept_cnt:0.
[12-16 11:58:58 ty D][426a][smart_frame.c:241] set all dp rate rule, dpID:21, curr_t:1765857538, rept_cnt:0.
[12-16 11:58:58 ty D][4393][ty_app_lig_component.c:83] heapsize :61044 byte
[12-16 11:58:59 ty D][426a][mqc_app.c:409] Rev MQTT:{"data":{"dps":{"42":"000100016432000003e8007803e800f003e8003c03e800b403e8012c03e8"}},"protocol":5,"t":1765857538}
[12-16 11:58:59 ty D][426a][sf_mqc_cb.c:11] Rev DP Cmd
[12-16 11:58:59 ty D][436b][smart_frame.c:1277] Rev Cmd 1, data:0x427eac
[12-16 11:58:59 ty D][436b][ty_app_lig_trigger_dp.c:474] ## dp_cnt:1,cmd_tp:1,dtt_tp:0 ##,
[12-16 11:58:59 ty N][436b][ty_app_lig_trigger_dp.c:120] obj dpid:42
[12-16 11:58:59 ty D][43a8][ty_app_lig_event.c:108] event id :0X70 cluster:5 ->>>>
[12-16 11:58:59 ty D][43a8][ty_app_lig_evt_timer.c:325] all adv timer stop
[12-16 11:58:59 ty D][43a8][app_dimmer_paint_method.c:2897] stop stepless
[12-16 11:58:59 ty D][43a8][smart_frame.c:4366] rept chan:1
[12-16 11:58:59 ty D][43a8][smart_frame.c:428] dp<21> check. need_update:0 pv_stat:3 trig_t:0 dp_rept_type:0 force_send:0 prop_tp:3
[12-16 11:58:59 ty D][43a8][smart_frame.c:582] is_need_update:0, is_dp_passive:0, pv_stat:3, uling_cnt:0
[12-16 11:58:59 ty D][43a8][smart_frame.c:639] obj dp rept filtered:21
[12-16 11:58:59 ty D][43a8][smart_frame.c:702] no vaild dp to rept
[12-16 11:58:59 ty D][43a8][smart_frame.c:4379] dp compose null, ret:-3585
[12-16 11:58:59 ty D][43a8][app_light_mode.c:159] set mode:3
[12-16 11:58:59 ty D][43a8][app_dimmer_local_music.c:156] refresh_time:10, sensitive :244
[12-16 11:58:59 ty D][43a8][smart_frame.c:4366] rept chan:1
[12-16 11:58:59 ty D][43a8][smart_frame.c:428] dp<42> check. need_update:0 pv_stat:3 trig_t:0 dp_rept_type:0 force_send:0 prop_tp:2
[12-16 11:58:59 ty D][43a8][smart_frame.c:582] is_need_update:1, is_dp_passive:0, pv_stat:2, uling_cnt:0
[12-16 11:58:59 ty D][43a8][smart_frame.c:2801] dp rept_type:0, data:{"42":"010100016432000003E8007803E800F003E8003C03E800B403E8012C03E8"}
[12-16 11:58:59 ty D][43a8][mqc_app.c:873] Send MQTT Msg.P:4 N:49340 Q:1 Data:{"dps":{"42":"010100016432000003E8007803E800F003E8003C03E800B403E8012C03E8"}}
[12-16 11:58:59 ty D][43a8][tuya_svc_mqtt_client.c:455] packet id: 22
[12-16 11:58:59 ty D][426a][smart_frame.c:2342] msg_data:{"dps":{"42":"010100016432000003E8007803E800F003E8003C03E800B403E8012C03E8"}}, mqtt async dp cb:0
[12-16 11:58:59 ty D][426a][smart_frame.c:224] set short dp rate rule, dpID:42, curr_t:1765857539, rept_cnt:2.
[12-16 11:58:59 ty D][426a][smart_frame.c:232] set long dp rate rule, dpID:42, curr_t:1765857539, rept_cnt:0.
[12-16 11:58:59 ty D][426a][smart_frame.c:241] set all dp rate rule, dpID:42, curr_t:1765857539, rept_cnt:0.
[12-16 11:59:01 ty D][4393][ty_app_lig_component.c:83] heapsize :60504 byte
adc ddev_open error:1
[12-16 11:59:04 ty D][42f3][tbl_dimmer_music.c:120] tdl_sound_dev_sample error

[12-16 11:59:04 ty D][4393][ty_app_lig_component.c:83] heapsize :60504 byte
[12-16 11:59:04 ty D][4393][tbl_light_dimmer_app_data.c:211] app_tp:2
[12-16 11:59:04 ty D][4393][tbl_light_storage.c:221] write data key:mode
[12-16 11:59:04 ty D][4393][tbl_light_storage.c:222] write data 4 <0x43a36c>
03 00 00 00

[12-16 11:59:04 ty D][4393][tbl_light_dimmer_app_data.c:211] app_tp:6
[12-16 11:59:04 ty D][4393][tbl_light_storage.c:221] write data key:dimmer_paint
[12-16 11:59:04 ty D][4393][tbl_light_storage.c:222] write data 29 <0x427e88>
e8 03 e8 03 00 00 00 00 00 00 02 00 e8 03 e8 03 00 00 00 00 00 00 00 00 00 00 00 00 00

[12-16 11:59:04 ty E][4393][tbl_light_storage.c:211] *********data len is too long*********,key:dimmer_local_music, 463>0
[12-16 11:59:04 ty E][4393][app_dimmer_local_music.c:213] ret:-2
[12-16 11:59:04 ty N][4393][tfm_timing_storage.c:168] storage sucess
[12-16 11:59:04 ty D][4393][tbl_light_dimmer_app_data.c:87] light write app data
[12-16 11:59:06 ty D][436b][tuya_svc_mqtt_client.c:912] mqtt_ping -->>
[12-16 11:59:06 ty D][436b][tuya_svc_mqtt_client.c:926] mqtt_ping <<--
[12-16 11:59:06 ty D][426a][tuya_svc_mqtt_client.c:1207] ping respond. update fail_cnt:0
[12-16 11:59:07 ty D][4393][ty_app_lig_component.c:83] heapsize :60504 byte

[12-16 12:00:07 ty D][4393][ty_app_lig_component.c:83] heapsize :60504 byte
[12-16 12:00:10 ty D][4393][ty_app_lig_component.c:83] heapsize :60528 byte
[12-16 12:00:13 ty D][4393][ty_app_lig_component.c:83] heapsize :60528 byte
adc ddev_open error:1
[12-16 12:00:15 ty D][42f3][tbl_dimmer_music.c:120] tdl_sound_dev_sample error

[12-16 12:00:16 ty D][4393][ty_app_lig_component.c:83] heapsize :60460 byte
[12-16 12:00:17 ty D][42d6][tuya_devos_health.c:71] feed watchdog

测试观察下来,不怎么影响本地音乐功能的使用,但是这种情况是如何发生的?

Post Reply