中级会员
 
- 积分
- 239
- 金钱
- 239
- 注册时间
- 2018-7-12
- 在线时间
- 31 小时
|
1金钱
串口打印出来的信息:
SPADS Calibration Error,Restart this step
The SPADS Calibration Start...
Calibration is error!!---------------------------------------------------------------
IIC调出来可以读寄存器地址0x00c0的数据是0xEEAA,也改了寄存器地址为0x54,再读出来也没错,但是到了SPADS校准这里就出现问题了。
Debug发现在VL53L0X_StaticInit()函数里的VL53L0X_get_info_from_device()这个函数里
if (((option & 1) == 1) &&
((ReadDataFromDeviceDone & 1) == 0)) {
Status |= VL53L0X_WrByte(Dev, 0x94, 0x6b);
Status |= VL53L0X_device_read_strobe(Dev);//执行到这句的时候 我Dev的设备地址会变成别的,多调试几次还有几率出现0x54(设定的IIC寄存器的设备地址)。
Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
为什么会出现这个情况呢 ?
初始化的时候也用到了VL53L0X_get_info_from_device();这个函数,就没报错。
|
最佳答案
查看完整内容[请看2#楼]
对的,iot不用接,我用的不是原子的模块,用的是这个绿色的模块:https://item.taobao.com/item.htm?spm=a230r.1.14.132.73dd632c1EA4Fq&id=562901738882&ns=1&abbucket=12#detail,这是我参考原子哥程序移植的,https://download.csdn.net/download/changshengxiao/10997790。
|