Skip to main content
John E KVAM
ST Employee
March 6, 2020
Question

Customer writes, "We have a small number of VL6180 sensors that apparently return a random number about 3% of the time. Sometimes the error return is error 12 - 'underflow'"

  • March 6, 2020
  • 1 reply
  • 597 views

We

This topic has been closed for replies.

1 reply

John E KVAM
ST Employee
March 6, 2020

This issue was found a while back. Please update your API with the latest from ST.com, or get the latest app note on how to set up the sensor.

Look for:

VL6180x_RangeStaticInit() in the file VL6180X_api.c

Esp check for:

    VL6180x_WrByte(dev, 0x00e3, 0x01);

    VL6180x_WrByte(dev, 0x00e4, 0x03);

If you have the latest, you will have these settings.

These settings disable the I2C interface from interrupting critical sections of the internal firmware.