2024-01-26 03:15 AM
I have a VL53L8CX time of flight sensor connected via I2C on a custom board. The Board has other devices that can talk on I2C no problem.
now i cant see the i2c address of the ToF device.
from my understanding everything seems to be fine and in accordance with the datasheet.
However there are two things that might be not correct and i want to make sure that my assumptions are not wrong.
about the LPn pin (A2) in the datasheet this is written:
Enables communication. Drive this pin to logic 0
to disable I²C communication when the device is
in low-power mode. Drive this pin to logic 1 to
enable I²C communication in low-power mode.
This pin is typically used when you need to
change the I²C address in multidevice systems. If
it is not used, or if interfacing via the SPI,
connect to IOVDD with a 47 kΩ pullup resistor
I dont plan to use the low power i2c mode. so i connected it to IOVDD via a 47kohm resistor. Was this correct?
the other thing i am not sure about are these pins: SYNC, INT
i was planning not to use them so i didnt connect them to anything. basically they are floating.
however for the INT pin it states:
Interrupt output, defaults to open drain output
(tristate), 47 kΩ pullup resistor to IOVDD required
so is it required to have the 47kohm even if you dont want to use the interrupt pin? Would that prevent the device address from showing up at all?
almost the same text is written for the SYNC pin:
General purpose I/O, defaults to open drain
output (tristate), 47 kΩ pullup resistor required to
IOVDD
TLDR:
i2c scanner does not show the ToF device. communication not possible.
i have two pins that i am not using and have left floating: INT and SYNC.
i was using this datasheet: https://www.st.com/resource/en/datasheet/vl53l8cx.pdf
question: is this the reason why the device does not show up in a i2c address scan?
Solved! Go to Solution.
2024-01-26 07:59 AM
The reason the sensor is not responding is because it's either not powered or the LPn is not high or the SPI/I2C pin is wrong.
Leaving the INT and Sync pins floating while not ideal, should not keep the chip in reset.
The sensor has a lot of firmware that gets loaded during initialization. But at boot that MCU is not running. What is running is our I2C/SPI engine.
C1 - SPI_I2C_N Digital input
I2C: connect to GND
SPI: connect to IOVDD
As you did not mention the SPI_I2C_N, I'm guessing that needs looking at.
2024-01-26 07:59 AM
The reason the sensor is not responding is because it's either not powered or the LPn is not high or the SPI/I2C pin is wrong.
Leaving the INT and Sync pins floating while not ideal, should not keep the chip in reset.
The sensor has a lot of firmware that gets loaded during initialization. But at boot that MCU is not running. What is running is our I2C/SPI engine.
C1 - SPI_I2C_N Digital input
I2C: connect to GND
SPI: connect to IOVDD
As you did not mention the SPI_I2C_N, I'm guessing that needs looking at.