cancel
Showing results for 
Search instead for 
Did you mean: 

Device unique ID for VL53L5CX ?

LK
Associate II

Hello all,

does the vl53l5cx ULD API (STSW-IMG023) can expose  a unique device ID for the VL53L5CX ? Something similar to the VL51L1 API function call "VL53L1_Error VL53L1_GetUID(VL53L1_DEV Dev, uint64_t *pUid)"  in the driver SWSW-IMG019 ?

 

Kind regards

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Thank you for your suggestion and we will consider to add this is a next driver release.

Next week, we could deliver this api function in this forum if you are interested in.

Regards

Anne


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

6 REPLIES 6
John E KVAM
ST Employee

I think the code you want is in the API.

int32_t vl53l5_get_module_info(
	struct vl53l5_dev_handle_t *p_dev,
	struct vl53l5_module_info_t *p_module_info)

That function calls decode_module_funtion() which eventually gets to:

	p_module_info->module_id_hi = vl53l5_decode_uint32_t(4, p_buff);
	p_buff += 4;

	p_module_info->module_id_lo = vl53l5_decode_uint32_t(4, p_buff);

Which are the lines you want.

- 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.
LK
Associate II

Hello John,

thank you for your fast response. Unfortunatly I can not find a function "int32_t vl53l5_get_module_info" in the driver package STSW-IMG023 v1.3.10  or the Linux Dirver STSW-IMG025 . All API functions in these driver packages are starting with "vl53l5cx_". Can you please give more details on the driver package you are refering to ? May a functional code snippet would also serve as well.

Kind regards.

Hello,
In the vl53l5cx_api.c file, you can find the vl53l5cx_is_alive function :

uint8_t vl53l5cx_is_alive(
 VL53L5CX_Configuration  *p_dev,
 uint8_t    *p_is_alive)
{
uint8_t status = VL53L5CX_STATUS_OK;
uint8_t device_id, revision_id;

status |= WrByte(&(p_dev->platform), 0x7fff, 0x00);
status |= RdByte(&(p_dev->platform), 0, &device_id);
status |= RdByte(&(p_dev->platform), 1, &revision_id);
status |= WrByte(&(p_dev->platform), 0x7fff, 0x02);

if((device_id == (uint8_t)0xF0) && (revision_id == (uint8_t)0x02))
{
 *p_is_alive = 1;
}
else
{
 *p_is_alive = 0;
}

return status;
}


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
LK
Associate II

Hello Anne,

I am looking more for a unique id different for each device to enable some sort of traceability. The device_id in the API function "vl53l5cx_is_alive()" is not sufficient for this purpose. The "vl53l5_module_info_t" mentioned by John seams to be the right direction - but unfortunatley is not available in the official driver releases. May a thing ST can consider in a next driver release ?

Hello,

Thank you for your suggestion and we will consider to add this is a next driver release.

Next week, we could deliver this api function in this forum if you are interested in.

Regards

Anne


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

Hello Anne,

yes please - would be great to have this function as early as possible available.

Kind regards.