2025-02-20 05:57 AM - last edited on 2025-02-20 06:40 AM by Peter BENSCH
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.