tuya_ble_lock_sdk_bk3431q_with_fitting-master SDK中的adc,初始化后,定时读取ADC值;但一旦调用adc_get_value接口,程序就会重启,只有注释掉这句代码,才不会重启,可注释掉后也得不到正确的ADC值,是不是adc有问题
【已解决】tuya_ble_lock_sdk_bk3431q_with_fitting-master
【已解决】tuya_ble_lock_sdk_bk3431q_with_fitting-master
- Attachments
-
Last edited by 物联网菜鸟 on 2023年 May 24日 11:05, edited 1 time in total.
Re: 【求助】tuya_ble_lock_sdk_bk3431q_with_fitting-master
您好,请问有调用void adc_init(uint8_t chanle, uint8_t mode)初始化adc吗?
可以将初始化、adc_get_value接口调用的地方贴一下,方便分析排查
Re: 【求助】tuya_ble_lock_sdk_bk3431q_with_fitting-master
需要将外设驱动使能打开,详见user_config.h下,将ADC_DRIVER设为1
Re: 【求助】tuya_ble_lock_sdk_bk3431q_with_fitting-master
好的,使能之后就可以了,谢谢解答