Poor status above 300mm using VL53L4CD
I'm using a VL53L4CD as a proximity switch but with a user selectable threshold. I began developing on XNUCLEO-53L4A1 on a NUCLEO-F401 but have since migrated to my own pcb using STM32C071. I am having difficulty with poor status reports from the ToF device at distances above about 300mm on my own board. Under 300mm I get a status of 0 but anything above that and it quickly deteriorates to 1, 2 or 4 and the distance becomes very erratic.
Thinking that it was down to the specifics of the pcb I reverted to the F401/XNUCLEO arrangement and I now see it's not that much better and certainly nowhere near 1.2m. I can get to about 500mm with status 0 but much beyond that leads to a status of 1 or 2 and eventually 4. My maximum range is 500mm so it's barely okay on the F401 but not on my own pcb.
I'm using the standard API with some mods which don't amount to very much (threshold hysteresis mainly). It doesn't seem to matter whether the (standard) cover glass is fitted or not. The application is exposed to daylight of varying levels.
I have used what I consider to be good layout techniques on my pcb. The sensor is connected via a 50mm flex to the main board, carrying the power, I2C signals plus a couple of LED signals. There's a 4.7uF and 10nF cap adjacent to the sensor on the sensor pcb. Vdd is 3.3V.
Ranging frequency is 20Hz, timing budget is 15ms.
Please can anyone suggest anything? TIA.
