完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我修改了platform.h和platform.c以在Raspberry Pi上运行。 i2c-tools显示我可以读取设备,例程VL53L0X_DataInit()不返回任何错误,因此我可以写入设备。但是我从VL53L0X_get_info_from_device()例程中收到超时错误。
有没有完整的内部寄存器列表以及它们为VL53L0X器件做什么的地方?对于只需在I2C总线上翻转几位,API似乎非常复杂。 谢谢! 麦克风 #vl53l0x 以上来自于谷歌翻译 以下为原文 I have modified the platform.h and platform.c to run on Raspberry Pi. The i2c-tools show I can read the device, and the routine VL53L0X_DataInit() returns no error, so I can write to the device. But I am getting a timeout error from the VL53L0X_get_info_from_device() routine. Is there any place where a complete list of internal registers and what they do for the VL53L0X device exist? The API seems really complicated for just having to flip a few bits on the I2C bus. Thanks! Mike #vl53l0x 本帖被以下淘专辑推荐:
|
|
相关推荐
4个回答
|
|
我把它追逐到了一个叫做“频闪”的东西。它将0写入寄存器0x83并期望返回非零。然后当它变为非零时,它会写入1.我不知道这个寄存器是什么,也不知道它应该做什么,但它显然没有做它应该做的事情。
您可以在文件vl53l0x_api_core.c中看到这一点,函数VL53L0X_device_read_strobe()。 嗯......不管它是否超时,我想它会写一个1。主要问题是为什么它超时? 以上来自于谷歌翻译 以下为原文 I have chased it down to something called ''strobe''. It writes a zero to register 0x83 and expects non-zero back. Then when it gets non-zero back it writes a 1. I have no idea what this register is, nor what it is supposed to do, but it obviously isn't doing what it is supposed to do. You can see this in file vl53l0x_api_core.c, function VL53L0X_device_read_strobe(). Hmmm.... I guess it writes a 1 no matter if it times out or not. The main question is why is it timing out? |
|
|
|
好的,所以我的实际问题是WrByte()例程实际上并没有正确地通过i2c发送数据。现在它确实如此,我已经解决了这个问题,并且遇到了测距错误。但至少该设备不再悬挂。
对ST说:请发布注册地图!!! 以上来自于谷歌翻译 以下为原文 OK, so my actual problem was the WrByte() routine was not actually sending data correctly over the i2c. Now it does, and I am past this problem and onto a ranging error. But at least the device is no longer hanging. And a word to ST: please publish a register map!!! |
|
|
|
我有5个单位,我可以插入我的Pi。其中3个给出了浮点错误,其中2个给出了范围错误错误。我决定追逐浮点错误并在常规calc_macro_period_ps()中找到除以零,因为0作为参数发送。通过重新排序在VL53L0X_perform_ref_spad_management()之前发生的初始化值(并通过设置
而不是没有值,具有浮点错误的3个单元现在实际上正在读取范围数据。现在,我所要做的就是找到一种方法来通过写入默认的内部值来修复损坏的单位,他们也可以做一些有用的事情。 这仍然令人沮丧,因为我不知道ANYTHING的正确值应该是什么,也不知道为什么它们应该是那样。 麦克风 以上来自于谷歌翻译 以下为原文 I have 5 units I can plug into my Pi. 3 of them gave floating point errors, and 2 of them give the range fault error. I decided to chase down the floating point error and found a divide by zero in routine calc_macro_period_ps() because 0 was sent in as a parameter. By reordering the initialization values to occur before VL53L0X_perform_ref_spad_management() (and by setting
instead of having no value, the 3 units which had floating point errors are now actually reading back range data. Now, all I have to do is find a way to fix the broken units by writing over their default internal values and they might do something useful as well. This is still frustrating though because I have no idea what the correct values for ANYTHING should be, nor why they should be that way. Mike |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2738 浏览 1 评论
3241 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1810 浏览 1 评论
3650 浏览 6 评论
6039 浏览 21 评论
1339浏览 4评论
201浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
353浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
444浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
274浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 02:19 , Processed in 0.629155 second(s), Total 48, Slave 43 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号