【求助】iotos运行一段时间,adc报错

蓝牙 BLE设备、蓝牙 MESH设备、蓝牙 Beacon设备、Sub-G设备等


Post Reply
狂扇赵四那半拉好嘴
Posts: 39

[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:4
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:6
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:7
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:8

Attachments
V0.6.2_com3_[2022-10-18_11;28;43].log.zip
(1.6 KiB) Downloaded 221 times
狂扇赵四那半拉好嘴
Posts: 39

Re: iotos运行一段时间,adc报错

报错信息为
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][PLATFORM ERROR]tuya_hal_adc_value_get ddev_open error:-5
[11;28;45][10-18 11:28:45 TUYA Notice][lr:0x585f3] [smdz_ntc_temp_control_fun]ntc_abnormal_count:8

狂扇赵四那半拉好嘴
Posts: 39

Re: iotos运行一段时间,adc报错

SDK版本:ty_iot_sdk_bk7231n-2.3.3

狂扇赵四那半拉好嘴
Posts: 39

Re: iotos运行一段时间,adc报错

tuya_adc_t *adc ;
THREAD_HANDLE thread_ntc_temp_sampling_handle = NULL;//温度采样线程
static NTC_SENSOR *ntc_sensor; //定义传感器指针变量

/**

  • @Function: void adc_init
  • @Description: 初始化adc io
  • @Output: none
  • @Return: none
  • @Others: 无
    */
    void adc_init(void)
    {
    adc= (tuya_adc_t *)tuya_driver_find(TUYA_DRV_ADC, TUYA_ADC2);
    if (NULL == adc) {
    PR_ERR("tuya hal find failed");
    return;
    }
    TUYA_ADC_CFG(adc, TUYA_ADC2, 0);
    tuya_adc_init(adc);//ADC初始化

}

**

  • @brief thread_ntc_arry_func

  • 线程调用函数

  • @param[in] none

  • @return none

  • @output
    */
    void thread_ntc_temp_sampling_func(void){
    adc_init();
    for (;;) {
    set_ntc_temp_param();//设置ntc温度参数值
    }

    // PR_NOTICE("thread ntc task will release");
    // op_ret = tuya_hal_thread_release(thread_ntc_temp_sampling_handle);//释放线程
    // if (OPRT_OK != op_ret) {
    // PR_ERR("release thread_ntc_temp_sampling_handle failed, err_num:%d", op_ret);
    // return;
    // }
    }

/**

  • @brief thread_ntc_init

  • ntc线程

  • @param[in] none

  • @return none
    */
    void thread_ntc_init(NTC_SENSOR *ntc10)
    {
    OPERATE_RET op_ret = OPRT_OK;
    ntc_sensor_int(ntc10);

    op_ret = tuya_hal_thread_create(&thread_ntc_temp_sampling_handle, "thread_ntc_temp_sampling", 2048, TRD_PRIO_4, thread_ntc_temp_sampling_func, NULL);
    if (op_ret != OPRT_OK) {
    PR_ERR("thread_ntc_temp_sampling_func task failed, err_num:%d", op_ret);
    return;
    }
    }

部分代码如下,麻烦看一下。

beautifulzzzz
Posts: 48

Re: iotos运行一段时间,adc报错

您好,请问您这边用的什么平台(芯片平台,用的哪个SDK)

创造传奇,不是卖艺! 8-)
Post Reply