2024-07-15 02:24 AM
I was using the sensor until now on an Raspberry Pi with direct access to the I2C bus without problems.
Now I use an FT260 USB-I2C interface to communicate to the sensor from a PC via USB. In principle the communication is working, e.g. vl53l5cx_is_alive() works as expected.
But the initialization fails. On the poll for sensor booted status I now always get a 9 as the answer instead of the expected 1 until the timeout is reached.
In the documentation I haven't found any hint what the value of 9 at this point means.
This is the place where vl53l5cx_init() fails:
/* Wait for sensor booted (several ms required to get sensor ready ) */
status |= WrByte(&(p_dev->platform), 0x7fff, 0x00);
status |= _vl53l5cx_poll_for_answer(p_dev, 1, 0, 0x06, 0xff, 1);
if(status != (uint8_t)0){
printf("vl53l5cx_init(): Wait for sensor booted failed\n");
goto exit;
}
And inside _vl53l5cx_poll_for_answer() I see that the returned value is 9. Because the expected value is 1 _vl53l5cx_poll_for_answer() fails.
Any idea?