vl53l1
I am trying to make a driver for the vl531x proximity sensor. I am using the X-NUCLEO-53L1A1 Expansion Board with a Nordic pca10040 development board for NRF52832 processor.
The sensor is responding to I2C reads and writes, but not to the given address 0x52. Instead, 0x42 and 0x43 work, as well as 0x29, which makes the most sense as it is 0x52 shifted right by one bit.
I am using the vl53l1x_api provided by ST. I have implemented the necessary HAL interfaces, such as IIC and timer.
The sensor does give responses to the IIC writes and reads, but the answers are not what expeceted.
Examples:
vl53l_platform: VL53L1_RdByte, index: 0x10F
cfx_vl53lxx_drv: Model_ID: 0x1vl53l_platform: VL53L1_RdByte, index: 0x110cfx_vl53lxx_drv: Module_Type 0x1The answer to both registers is 1, when they should be 0xea and 0xcc respectively.
The VL53L1_FIRMWARE__SYSTEM_STATUS register has the value 0x16, which is different from the expected 0x01, giving the impression that the device is not booted properly.
When trying to make a measurement, the measurement struct has value 0xff for both the range and status fields.
As the register contents are not documented, and the driver comprises hard coded hex values to which the return values are compared, i have no means of figuring out what is wrong, and if the fault is in my IIC driver implementation, HW configuration, or if the sensor is damaged in some way and i should try a new one.
What would be your suggestion on how to proceed?
#vl53l1x #proximity-sensors