cancel
Showing results for 
Search instead for 
Did you mean: 

VL531L1 measurements always FF.

TChar.288
Associate II

I have rewritten the C app for the VL531 in LAIRD SmartBasic in order to drive the VL531 from a BT module (BL652). I communicate OK with the VL531 over I2C but when I sent the start command (and after I get a Data Ready from register 0x31 as shown below), the results I get are FFs and the Range status is 01 (SIGMA problem????), as in following:

 VL53L1X Model_ID: EA Reg: 0000010F

VL53L1X Module_Type: CC Reg: 00000110

VL53L1X Mask_Revision: 10 Reg: 00000111

__________________________________________________

Address Verification (0x29) : 29 in: 00000001

Value : 03 in: 00000031

Range Status is : 01 in: 00000089

MSB Distance is : FF in: 00000096

LSB Distance is : FF in: 00000097

Distance mode is : 0A in: 0000004B

Report Status is : 00 in: 0000008A

Result Stream Count is : 00 in: 0000008B

Signal is : FF in: 00000098

SPNB is : FF in: 0000008C

SignalPerSpad is 2000.0*signal/SpNb :

AmbientRate is : FF in: 00000090

AmbientlPerSpad is 2000.0*AmbientRate/SpNb :

ROI Center is : 3F in: 0000013E

2 REPLIES 2
John E KVAM
ST Employee

The most comon cause of this type of issue is that words and longwords are not properly sent to the sensor. Because all the byte reads and writes work, it appers the sensor is properly communicating, but it might not be.

Have a look at the attached app note. It contains code to help you verify your I2C communications.

Get the code in there to work once, then you can remove it.

Write back if you are still having issues.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
TChar.288
Associate II

Thanks John, I'll see what I can make out of it. As I said I am converting the driver to Smart Basic and there is limited to none flexibility there regarding words and longwords.