Failed to boot VL53L0X: VL53L0X Error: -6 I am using a VL53L0X sensor in my project.
It was working fine when suddenly it started to show failed to boot error.
I tried debugging but of no use. I ran I2C scanner sketch and it detected the sensor at 0x29.
I get the following error -
23:38:27.797 -&gt; Adafruit VL53L0X test
23:38:27.830 -&gt; VL53L0X Info:
23:38:27.830 -&gt; Device Name: VL53L0X ES1 or later, Type: VL53L0X, ID: VL53L0CBV0DH/1$1
23:38:27.830 -&gt; Rev Major: 1, Minor: 1
23:38:27.864 -&gt; VL53L0X: StaticInit
23:38:27.932 -&gt; VL53L0X: PerformRefSpadManagement
23:38:27.932 -&gt; refSpadCount = 2226323456, isApertureSpads = 92
23:38:27.932 -&gt; VL53L0X Error: -6
23:38:27.932 -&gt; Failed to boot VL53L0X


This is the code I used (its the example code with just 0x29 and true passed in begin function for verbose output):
#include &quot;Adafruit_VL53L0X.h&quot;

Adafruit_VL53L0X lox = Adafruit_VL53L0X();

void setup() {
  Serial.begin(115200);

  // wait until serial port opens for native USB devices
  while (! Serial) {
    delay(1);
  }
  
  Serial.println(&quot;Adafruit VL53L0X test&quot;);
  if (!lox.begin(0x29,true)) {
    Serial.println(F(&quot;Failed to boot VL53L0X&quot;));
    while(1);
  }
  // power 
  Serial.println(F(&quot;VL53L0X API Simple Ranging example\n\n&quot;)); 
}


void loop() {
  VL53L0X_RangingMeasurementData_t measure;
    
  Serial.print(&quot;Reading a measurement... &quot;);
  lox.rangingTest(&amp;measure, false); // pass in 'true' to get debug data printout!

  if (measure.RangeStatus != 4) {  // phase failures have incorrect data
    Serial.print(&quot;Distance (mm): &quot;); Serial.println(measure.RangeMilliMeter);
  } else {
    Serial.println(&quot; out of range &quot;);
  }
    
  delay(100);
}

I am using an Arduino nano -
following are the connections
ARDUINO-&gt;VL53L0X
3v3-&gt;Vin
GND-&gt;GND
A4-&gt;SDA
A5-&gt;SCL
I have rechecked the connection and voltages the sensor does receive 3v3 and gnd.
I need help with this asap.
Thanks in advance :)
I was facing same issue, now my problem is solved here.
This problem mostly occurs when we apply a power supply to the MCU that has capacitors at its output. This type of power supply's rising voltage is like you can see the image:

If you look at the data sheets of MCUs, you see that most MCUs can work at 1.8V to 5.5V. Here the rising voltage is slow; the MCU starts working at 1.8V and send signals to VL53L0x, but the sensor doesn't work at 1.8V.
So, what you need to do is add some delay (first power supply gets stable then start communication with sensor) in your code to avoid this issue. Do not add delay in the loop; it will affect the working of the MCU, where exactly you need to add delay. Code modifications are in the video below:
https://youtu.be/QEiNbTB8nNE
or you just can search on Youtube: How to fix VL53L0X error