2025-09-22 3:19 AM
Hello,
I'm currently working with the VL53L5CX sensor and I came across the following definition in the header files of the API provided by ST :
#define VL53L5CX_STATUS_CRC_CSUM_FAILED ((uint8_t) 3U)
However, this constant doesn’t seem to be used anywhere in the API or referenced in error handling functions.
I would like to know:
What exactly does this constant represent? Is it related to an internal CRC or checksum mechanism?
Does the VL53L5CX sensor implement any internal CRC checking ?
Are there other ST Time-of-Flight sensors that implement CRC or similar integrity checks in their communication protocols?
Thanks in advance for your insights!
Best regards,
2025-09-22 7:56 PM
If you can't find anywhere, then it's not used. One expects that there was a plan to put something in, but it wasn't implemented in your version.
I remember a long conversation with a cell-phone company where they wanted it implemented, so they might have a special version, but it's not in yours.
But here is the thing. The I2C is a pretty iffy bus. Lots of times the transmission goes bad.
But what happens is the Transmitter and the receiver get out of sync, and the bus hangs with the famous 'bus stuck low' issue. (Google it.)
This is by far the biggest issue. And when it happens it's really obvious that the bus is stuck.
If you have control over the clock line, you can toggle it. It might take up to 8 times, but that will clear the jam and you can start over.
But I'm pretty certain the checksum is not implemented - and if your bus is not hung, you didn't need it.
- john