cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L1X does not boot.

velizarw
Associate II

I recently purchased VL53L1X ToF laser ranging sensor and for the last couple of weeks I am trying to make it work. Based on reference schematic from the datasheet I built the following setup:0690X00000ArVMTQA3.jpg

Using STM32L011 uCU, ULD API and LowLevel I2C libraries I am interfacing the sensor AND successfully reading/writing data from/to it. Here is a snippet of my communication to the sensor:

void LaserSense (void)
{
        uint8_t sensorState = 0;
	uint8_t byteData = 0;
	uint16_t wordData = 0;
 
//	Test I2C Communication.
	status = VL53L1_RdByte(VL53L1X_ADDRESS, 0x010F, &byteData);	//Model ID = 0xEA
	status = VL53L1_RdByte(VL53L1X_ADDRESS, 0x0110, &byteData);	//Module Type = 0xCC
	status = VL53L1_RdByte(VL53L1X_ADDRESS, 0x0111, &byteData);	//Mask Revision = 0x10
//	End test I2C Communication.
 
 
//	Reset Sensor
	status = VL53L1_WrByte(VL53L1X_ADDRESS, SOFT_RESET, 0x00);	//Reset
	DelayMillisec(100);
	status = VL53L1_WrByte(VL53L1X_ADDRESS, SOFT_RESET, 0x01);	// Exit Reset
 
	DelayMillisec(1000);
 
	//	Wait for device to boot. FixMe: Implement a timeout condition.
	while((sensorState & 0x1) == 0)
	{
		status = VL53L1X_BootState(VL53L1X_ADDRESS, &sensorState);
		DelayMillisec(100);
	}
 
...Some more code...ommited for simplicity reasons...
 
}

Here are oscillograms of the I2C bus, for the code above:

READ Model ID:

0690X00000ArVPrQAN.png

READ Module Type:

0690X00000ArVQ6QAN.png

READ Mask Revision:

0690X00000ArVQLQA3.png

WRITE Enter Reset Command:

0690X00000ArVQVQA3.png

WRITE Exit Reset Command:

0690X00000ArVQpQAN.png

READ Sensor Boot State:

0690X00000ArVR4QAN.png

From the oscillograms it is seen that the I2C communication is working.

The issue is that when I read the boot state internal register I am always receiving 0, which means that the device is not booted. This stops me from further device use.

Things I have tried so far:

  1. Resetting and not resetting the sensor before reading BootState.
  2. Different delay times (tens of ms to couple of seconds) between enterReset and exitReset writes.
  3. Pulling XSHDN pin to VDD (+3.3V) after powering up AVDD and AVDDCSEL as is one of the methods in datasheet.
  4. Writing MODIFIED version of VL51L1X_DEFAULT_CONFIGURATION[], where I changed the values of addresses 0x2e and 0x2f from 0 to 1, because my GPIO and I2C pins are pulled to +3.3V. (Others in internet use the sensor hooked to +3.3V just fine without this modification).
13 REPLIES 13

Hi John, thanks for your response. I created a new thread.

Hi Hardwariano,

I'm having the same problem, but I don't know if it is right. did you solve the problem?

John E KVAM
ST Employee

If you've gotten this far - the sensor is booted. There really isn't anything to keep it from booting. That call was put in just to keep you from accessing the sensor too quickly after the bootup. Just wait 10ms. The chip will be booted and you can move to the next step. The only thing people have trouble with at the 2-byte addresses.

(And you got past that.)


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.

Hi VVita,

check this thread I opened some time ago.