我的猜测是主设备和从设备之间没有正确的I2C连接,并且该功能挂起,因为它没有从从传感器获得ACK。
您确定设备已正确连接,并通过Vcc上拉吗?您是否有可能检查I2C通信的逻辑电平(使用逻辑分析仪)? HW的原理图也可以帮助诊断。
另外,检查是否使用传感器的正确I2C地址。
以上来自于谷歌翻译
以下为原文
My guess is that there is not a correct I2C connection between the master and slave devices and the function hangs, because it doesn't get an ACK from the slave sensor.
Are you sure that the devices are properly connected, with pull-ups to Vcc? Do you have a possibility to check the logic levels of the I2C communication (using a logic analyzer)? Schematics of your HW could also help with a diagnose.
Also, check whether you use the correct I2C addresses of the sensors.
我的猜测是主设备和从设备之间没有正确的I2C连接,并且该功能挂起,因为它没有从从传感器获得ACK。
您确定设备已正确连接,并通过Vcc上拉吗?您是否有可能检查I2C通信的逻辑电平(使用逻辑分析仪)? HW的原理图也可以帮助诊断。
另外,检查是否使用传感器的正确I2C地址。
以上来自于谷歌翻译
以下为原文
My guess is that there is not a correct I2C connection between the master and slave devices and the function hangs, because it doesn't get an ACK from the slave sensor.
Are you sure that the devices are properly connected, with pull-ups to Vcc? Do you have a possibility to check the logic levels of the I2C communication (using a logic analyzer)? Schematics of your HW could also help with a diagnose.
Also, check whether you use the correct I2C addresses of the sensors.
举报