VL53L1X sensorState returns 0 at bootup
Hello all,
I am using the VL53L1x ultra lite driver from ST. I have 34 VL53L1X devices currently running and two of these devices suddenly would not boot the VL53L1X sensor. Note that this device did work before.
We also have a GSM modem on the board and I have noticed RF interference that affects the sensor. I have therefore opted to switch off the modem before booting the sensor. Note also the extremely long delays when toggling the XSHUT pin.
Basically, the sensorState value stays zero until the watchdog times out (after about 30s). The whole device reboots and the sequence simply repeats.
Why would these 2 sensors (out of 34 running the same firmware) behave like this?
__HAL_IWDG_RELOAD_COUNTER(&hiwdg);
modem_off_on();//modem off
XSHUT_GPIO_Port->ODR &= (~XSHUT_Pin);
HAL_Delay(10000);
XSHUT_GPIO_Port->ODR |= XSHUT_Pin;
HAL_Delay(5000);
status = VL53L1_RdByte(DEV, 0x010F, &byteData);
status = VL53L1_RdByte(DEV, 0x0110, &byteData);
status = VL53L1_RdWord(DEV, 0x010F, &wordData);
while (sensorState == 0) {
status = VL53L1X_BootState(DEV, &sensorState);
HAL_Delay(2);
