VL53L1X does not boot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-31 6:13 AM
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).
- Labels:
-
I2C
-
STM32L0 Series
-
Time of flight
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-16 6:00 AM
Hi John, thanks for your response. I created a new thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 8:59 AM
Hi Hardwariano,
I'm having the same problem, but I don't know if it is right. did you solve the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 11:22 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-06 12:14 AM
Hi VVita,
check this thread I opened some time ago.

- « Previous
-
- 1
- 2
- Next »