VL53L1X does not boot.
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:
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:

READ Module Type:

READ Mask Revision:

WRITE Enter Reset Command:

WRITE Exit Reset Command:

READ Sensor Boot State:

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:
- Resetting and not resetting the sensor before reading BootState.
- Different delay times (tens of ms to couple of seconds) between enterReset and exitReset writes.
- Pulling XSHDN pin to VDD (+3.3V) after powering up AVDD and AVDDCSEL as is one of the methods in datasheet.
- 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).
