Skip to main content
Associate II
March 21, 2025
Solved

VL53L5CX Config error

  • March 21, 2025
  • 2 replies
  • 536 views

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?
This topic has been closed for replies.
Best answer by hegdeprashanth

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

2 replies

Associate II
March 21, 2025

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?
 
hegdeprashanthAuthorBest answer
Associate II
March 21, 2025

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