cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L8CX Data Read timming question: The time it takes to read the data when INT goes down.

davelee123s
Visitor

"I'm using the VL53L8CX sensor, the en.X-CUBE-TOF1 example, specifically from NUCLE -F401RE\Examples\53L8A1\53L8A1_SimpleRanging. The data reads correctly,

and I have verified the outputs. However, when the INT pin goes low and triggers an interrupt, it takes about 16ms to read the data.

I measured this time by toggling a GPIO pin before and after the read function. Even after adjusting various settings, the read time remains similar.

I am using an I2C speed of 400kHz.

Is this typical for the read operation? Additionally, I'd like to optimize the timing for use in an RTOS environment, where timing management is critical.

Below is the configuration:

 

#define TIMING_BUDGET (20U) /* 5 ms < TimingBudget < 100 ms */
#define RANGING_FREQUENCY (40U) /* Ranging frequency Hz (shall be consistent with TimingBudget value) */
#define POLLING_PERIOD (1)
static void MX_53L8A1_SimpleRanging_Process(void)
{
  uint32_t Id;

  VL53L8A1_RANGING_SENSOR_ReadID(VL53L8A1_DEV_CENTER, &Id);
  VL53L8A1_RANGING_SENSOR_GetCapabilities(VL53L8A1_DEV_CENTER, &Cap);

  Profile.RangingProfile = RS_PROFILE_4x4_CONTINUOUS;
  Profile.TimingBudget = TIMING_BUDGET;
  Profile.Frequency = RANGING_FREQUENCY; /* Ranging frequency Hz (shall be consistent with TimingBudget value) */
  Profile.EnableAmbient = 0; /* Enable: 1, Disable: 0 */
  Profile.EnableSignal = 0; /* Enable: 1, Disable: 0 */

  /* set the profile if different from default one */
  VL53L8A1_RANGING_SENSOR_ConfigProfile(VL53L8A1_DEV_CENTER, &Profile);

  status = VL53L8A1_RANGING_SENSOR_Start(VL53L8A1_DEV_CENTER, RS_MODE_BLOCKING_CONTINUOUS);
 
}
 
thank you. It might be a little awkward using a translator, but I hope the intentions were conveyed well. :)
 
0 REPLIES 0