2025-02-08 06:20 AM
static const uint8_t VL53L4CD_DEFAULT_CONFIGURATION[] = {
#ifdef VL53L4CD_I2C_FAST_MODE_PLUS
0x12, /* 0x2d : set bit 2 and 5 to 1 for fast plus mode (1MHz I2C),
else don't touch */
#else
0x00, /* 0x2d : set bit 2 and 5 to 1 for fast plus mode (1MHz I2C),
else don't touch */
#endif
0x00, /* 0x2e : bit 0 if I2C pulled up at 1.8V, else set bit 0 to 1
(pull up at AVDD) */
0x00, /* 0x2f : bit 0 if GPIO pulled up at 1.8V, else set bit 0 to 1
(pull up at AVDD) */
0x11, /* 0x30 : set bit 4 to 0 for active high interrupt and 1 for active low
(bits 3:0 must be 0x1), use SetInterruptPolarity() */
Above is the default configuration for the VL53L4CD (the beginning part anyway). When I first started testing with the VL53L4CD readings were static. Meaning, they never changed. The first reading was the only reading it would ever give out. However, comparing the Configuration I had for the VL53L1X I noticed that 0x11 (interrupt above) was instead 0x01. So, I tried 0x01 and everything worked as expected for the VL53L4CD. Readings changed.
What is going on here with the defaults? Can you help me understand what this configuration settings is all about exactly?
Thanks,
Will