大家好,
我通过I2C将STEVAL-MKI137V1(万用表传感器)连接到
STM32L152D-EVAL。我使用的库来自STM32CubeExpansion_MEMS1_V4.0.0。
我将I2C引脚连接到PB11和PB10,没有任何外部电阻
STEVAL-MKI137V1侧面。
这个问题对我来说很奇怪。大多数情况下代码不起作用,它会产生类似Acknowledge Failure的错误,有时代码运行良好而没有任何错误!
这个问题的预期原因是什么?我该如何解决?
注意:与外部上拉电阻有关的问题是什么?因为我没有使用它们。
提前致谢。
#steval-mki137v1#i2c
以上来自于谷歌翻译
以下为原文
Hi all,
I connected STEVAL-MKI137V1 (Magnometer sensor) to STM32L152D-EVAL through I2C. The library I am using is from STM32CubeExpansion_MEMS1_V4.0.0.
I connected I2C pins to PB11 and PB10 without any external resistors on
STEVAL-MKI137V1 side.
The problem is weird for me. Most of the
times the code do not work, it give error like Acknowledge Failure, and sometimes the code works very well without any error!
What is the expected reason of this problem? How can I solve it?
Note: is the problem related to external pull-up resistors? Because I did not use them.
Thanks in advance.
#steval-mki137v1 #i2c