VL53L4CD won't init
I'm trying to use a VL53L4CD with a micro. BTW the platform.c file is wrong. It says byte swapping is required for big-endian processors. In reality byte swapping is required for LITTLE=endian processors. Got past that and a number of other mistakes on my part. I can read the 16 bit ID (10F-110). But I can't init the device. Calls to the init function always return 255. I have stepped through it and everything looks good until it checks for ready, where it times out waiting. The ready function reads two bytes, shifting bit 4 of the first one down to bit 0 and inverting it (through a rather convoluted process). It than compares that to bit 0 of another byte. The first byte is 0x11, which results in a 0 after the manipulation. The second byte is a 1, so it always fails. Since the data sheet doesn't document any of this, I can't move past that.
BTW, after the program gets to this point and fails, accessing the ID word succeeds as an I2C transfer, but returns all 0s. I have to power cycle the device before I can get a valid ID again.
Any ideas to get over this hurdle would be appreciated. I've spent a day and a half getting to this point and there isn't a path forward for me at this point.
Wilton Helm
