完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
调试显示由于VL53L0X_GetinterruptMaskStatus中读取的VL53L0X_REG_RESULT_INTERRUPT_STATUS寄存器中的错误而失败。
谁能告诉我0x50,0x54和0x4C的值是什么以及如何解决它? 我的堆栈是: VL53L0X_GetInterruptMaskStatus()at vl53l0x_api.c:2,911 0x800510c VL53L0X_GetMeasurementDataReady()at vl53l0x_api.c:2,335 0x8005138 VL53L0X_measurement_poll_for_completion()at vl53l0x_api_core.c:72 0x800591e VL53L0X_perform_single_ref_calibration()at vl53l0x_api_calibration.c:1,076 0x8005438 VL53L0X_perform_vhv_calibration()at vl53l0x_api_calibration.c:1,144 0x800555a VL53L0X_perform_ref_calibration()at vl53l0x_api_calibration.c:1,227 0x800562c VL53L0X_perform_ref_spad_management()位于vl53l0x_api_calibration.c:763 0x80056e8 VL53L0X_PerformRefSpadManagement()at vl53l0x_api.c:3,034 0x800517a main.c上的TOF_InitSensor():287 0x800c44a该点的初始化代码如下所示: static const uint8_t i2cInitialAddress = 0x52; // LSB是保留的 uint8_t i2cFinalAddress = 0x60; memset(tofSens,0,sizeof(VL53L0X_Dev_t)); tofSens-> I2cDevAddr = i2cInitialAddress; tofSens-> comms_type = 1; tofSens-> comms_speed_khz = 100; VL53L0X_SetDeviceAddress(tofSens,i2cFinalAddress); tofSens-> I2cDevAddr = i2cFinalAddress; VL53L0X_DataInit(tofSens); //成功! VL53L0X_StaticInit(tofSens); //成功! uint32_t refSpadCount; uint8_t isApertureSpads; VL53L0X_PerformRefSpadManagement(tofSens,& refSpadCount,& isApertureSpads); // FAILSI与I2C设备通信正常。 #vl53l0x 以上来自于谷歌翻译 以下为原文 Debugging shows it fails due to error in the VL53L0X_REG_RESULT_INTERRUPT_STATUS register read in VL53L0X_GetInterruptMaskStatus. Can anyone tell me what values 0x50, 0x54 and 0x4C describe and how to resolve it? My stack is: VL53L0X_GetInterruptMaskStatus() at vl53l0x_api.c:2,911 0x800510c VL53L0X_GetMeasurementDataReady() at vl53l0x_api.c:2,335 0x8005138 VL53L0X_measurement_poll_for_completion() at vl53l0x_api_core.c:72 0x800591e VL53L0X_perform_single_ref_calibration() at vl53l0x_api_calibration.c:1,076 0x8005438 VL53L0X_perform_vhv_calibration() at vl53l0x_api_calibration.c:1,144 0x800555a VL53L0X_perform_ref_calibration() at vl53l0x_api_calibration.c:1,227 0x800562c VL53L0X_perform_ref_spad_management() at vl53l0x_api_calibration.c:763 0x80056e8 VL53L0X_PerformRefSpadManagement() at vl53l0x_api.c:3,034 0x800517a TOF_InitSensor() at main.c:287 0x800c44a The Initialisation code to that point looks like: static const uint8_t i2cInitialAddress = 0x52; // LSB is reserved uint8_t i2cFinalAddress = 0x60; memset(tofSens, 0, sizeof(VL53L0X_Dev_t)); tofSens->I2cDevAddr = i2cInitialAddress; tofSens->comms_type = 1; tofSens->comms_speed_khz = 100; VL53L0X_SetDeviceAddress(tofSens, i2cFinalAddress); tofSens->I2cDevAddr = i2cFinalAddress; VL53L0X_DataInit(tofSens); //Success! VL53L0X_StaticInit(tofSens); //Success! uint32_t refSpadCount; uint8_t isApertureSpads; VL53L0X_PerformRefSpadManagement(tofSens, &refSpadCount, &isApertureSpads); // FAILSI'm communicating fine with the device with I2C. #vl53l0x |
|
相关推荐
2个回答
|
|
极少数部件报告此错误。看起来校准的结果超出固件允许的范围,但在可接受的硬件范围内。在我们的测试中,部件工作正常,但不幸的是返回此错误。
您的选择是停止使用该部件作为故障部件,或允许该故障可接受。 - 约翰 以上来自于谷歌翻译 以下为原文 A very small number of parts report this error. It appears the result of the calibration falls outside of the range allowed by the firmware, but within an acceptable range of the hardware. In our testing, the parts work just fine, but do unfortunately return this error. Your choices are to discontinue use of that part as a failed part, or to allow that failure as acceptable. - john |
|
|
|
你好,约翰,
我似乎有同样的问题,但需要了解解决方案。我可以与VL53L0X通信到StaticInit,然后我调用VL53L0X_PerformRefSpadManagement然后VL53L0X_PerformRefCalibration,但我忽略了发回的错误。之后VL53L0X_SetDeviceMode工作正常,但我似乎遇到设置限制的问题。请下面的代码片段。 之后我尝试阅读,但后来又一次出现错误。 我究竟做错了什么? 最好的祝福, 加里 如何添加代码段? 以上来自于谷歌翻译 以下为原文 Hi John, I seem to have the same problem, but need to understand the solution. I can communicate to the VL53L0X upto StaticInit and then I call, VL53L0X_PerformRefSpadManagement and then VL53L0X_PerformRefCalibration but I ignore the error sent back. After that VL53L0X_SetDeviceMode works fine but I seem to have a problem with Setting the limits. Please the code snippet below. After which I try and do a reading but then I get an error once again. What am I doing wrong? Best Regards, Gary How do I add a code snippet? |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2634 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3609 浏览 6 评论
5987 浏览 21 评论
939浏览 4评论
1315浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
583浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1302浏览 3评论
1358浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 01:53 , Processed in 1.174752 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号