cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX Config error

hegdeprashanth
Associate II

I am trying to work with the VL53L5CX Tof sensor. The following calls succeed.

VL53L5CX_Init
VL53L5CX_ReadID
VL53L5CX_Start
 
However, the following call fails: 
    VL53L5CX_Result_t pResult;
    VL53L5CX_ProfileConfig_t _profile;
    _profile.RangingProfile = VL53L5CX_PROFILE_8x8_CONTINUOUS;
    _profile.TimingBudget = 200;
    _profile.Frequency = 1;
    _profile.EnableAmbient = 1;
    _profile.EnableSignal = 1;

    auto status = VL53L5CX_ConfigProfile(&vl53l5cx_obj, &_profile);
Especially, when the driver tries to set the resolution, the calls fails. Any idea why is it so?
1 ACCEPTED SOLUTION

Accepted Solutions

Got it working. The error was in writing to i2c function. Thanks!

View solution in original post

2 REPLIES 2
hegdeprashanth
Associate II

I also noticed that this call also fails in the uint8_t vl53l5cx_init function

   
status |= RdMulti(&(p_dev->platform), VL53L5CX_UI_CMD_START,
        p_dev->temp_buffer, VL53L5CX_NVM_DATA_SIZE);
 
Any idea?
 

Got it working. The error was in writing to i2c function. Thanks!