cancel
Showing results for 
Search instead for 
Did you mean: 

P-NUCLEO-53L7A1 Expansion pack is not really compatible with gesture recognition demo

MO94
Associate III

Hello, I have two expansion boards: X-NUCLEO-53L8A1 with VL53L8 and X-NUCLEO-53L7A1 with VL53L7CX.

I used a gesture recognition example project for NUCLEO-F401RE board I found on this page: https://www.st.com/en/embedded-software/stsw-img035.html?icmp=tt26851_gl_lnkon_may2022#get-software

The example project works fine for X-NUCLEO-53L8A1. However, when I tried to use X-NUCLEO-53L7A1, which is stated to be compatible in the manual, the vl53lmz_init function gets the "VL53LMZ_STATUS_UNKNOWN_DEVICE" error code (4) and exits here:

 

 

	/* method below copied from vl52l5cx_is_alive() */
	status |= WrByte(&(p_dev->platform), 0x7fff, 0x00);
	status |= RdByte(&(p_dev->platform), 0, &(p_dev->device_id));
	status |= RdByte(&(p_dev->platform), 1, &(p_dev->revision_id));
	status |= WrByte(&(p_dev->platform), 0x7fff, 0x02);
	if((p_dev->device_id!=(uint8_t)0xF0)
		|| ((p_dev->revision_id!=(uint8_t)REVISION_CUT11) && (p_dev->revision_id!=(uint8_t)REVISION_CUT12) && (p_dev->revision_id!=(uint8_t)REVISION_L8))) {
		/* unexpected combination of device and revision IDs */
		status = VL53LMZ_STATUS_UNKNOWN_DEVICE;
		goto exit;
	}

 

 

For the X-NUCLEO-53L8A1 extension, device_id is 0xF0 and revision_id is 12 (REVISION_L8).

For the X-NUCLEO-53L7A1 extension, the both device_id and revision_id are 46 (0x2e). This doesn't seem right. How can I be sure it reads the correct registers?

To make sure X-NUCLEO-53L7A1 works, I tested it with a simple ranging example found in CubeMX and it worked.

1 ACCEPTED SOLUTION

Accepted Solutions
Zhiyuan.Han
ST Employee

Hi 

Seems something went wrong during your test, as you mentioned, you can run with L7CX CubeIDE example, I pasted the code below, actually the function is nearly same as you showed for LMZ, there are two reg reading, for L7 the device_id is 0xF0, and revision_id is 0x02. if L7CX can pass, the LMZ should be able to pass the device check. 

"To make sure X-NUCLEO-53L7A1 works, I tested it with a simple ranging example found in CubeMX and it worked."

 

ZhiyuanHan_0-1749795682611.png

 

Br

Zhiyuan.Han


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Zhiyuan.Han
ST Employee

Hi 

Seems something went wrong during your test, as you mentioned, you can run with L7CX CubeIDE example, I pasted the code below, actually the function is nearly same as you showed for LMZ, there are two reg reading, for L7 the device_id is 0xF0, and revision_id is 0x02. if L7CX can pass, the LMZ should be able to pass the device check. 

"To make sure X-NUCLEO-53L7A1 works, I tested it with a simple ranging example found in CubeMX and it worked."

 

ZhiyuanHan_0-1749795682611.png

 

Br

Zhiyuan.Han


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.