cancel
Showing results for 
Search instead for 
Did you mean: 

Set Target Order & Thresholds in 53L5A1 BSP for VL53L5A1 Multi-Sensor Ranging?

moj
Visitor

In the 53L5A1 Board Support Package (BSP) for the VL53L5A1 Multi-Sensor Ranging module, setting the target order (e.g., VL53L5CX_TARGET_ORDER_STRONGEST or VL53L5CX_TARGET_ORDER_CLOSEST) doesn't seem to be directly exposed through the existing BSP functions.

The vl53l5cx_set_target_order() function in the vl53l5cx_api.h (from the VL53L5CX API) uses a different configuration structure (VL53L5CX_Configuration) compared to the structure used in the 53L5A1 BSP.

Is there any guidance, documentation, or example code available on how to create a wrapper function to bridge these APIs and control the target order and detection thresholds for each individual ToF sensor within the multi-sensor ranging module?

1 REPLY 1
John E KVAM
ST Employee

You don't see a:

uint8_t vl53l5cx_set_target_order(
		VL53L5CX_Configuration		*p_dev,
		uint8_t				target_order)

function in the vl53L5cx_api.c

Should be there. 

But if you are using the XCode_ToF, the functions get abstracted. 

That code tries to make a uniform interface even though the chips really are kind of different. 

And that leaves some stuff out. 

Your challenge is to figure out *p_dev is. 

With that you can call the functions in the API directly instead of going through the BSP.

- john

 


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.