Hi Associate
I suspect it was due to I2C function was not ported correctly, you can use below code do a I2C read/write function test to see if the I2C link is working fine.
// . byte read/write test
VL53L0X_write_byte(0x52, 0x04, 0x5A);
VL53L0X_read_byte(0x52, 0x04, &byteData);
if( 0x5A != byteData )
{
// error
}
// . word read/write test
VL53L0X_write_word(0x52, 0x04, 0x5AA5);
VL53L0X_read_word(0x52, 0x04, &wordData);
if( 0x5AA5 != wordData ) // cut 1.1
{
// error
}
// . dword read/write test
VL53L0X_write_dword(0x52, 0x04, 0x5AA5AA55);
VL53L0X_read_dword(0x52, 0x04, &dwordData);
if( 0x5AA5AA55 != dwordData )
{
// error
}
Br
Zhiyuan.Han
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.