cancel
Showing results for 
Search instead for 
Did you mean: 

SIMPLE RANGE MEASUREMENT WITH VL6180 AND STM32WB55

NASOK.1
Associate II

I'M JUST TRYING TO MEASURE DISTANCE USING VL6180X SENSOR WITH STM32 BUT I COULDN'T SUCCEED.CHECKED THE I2C DEV ADDRESS(0X29),VL6180 SENSOR ID(0XB4).AND JUST USING A FEW FUNCTIONS FROM API LIKE INIT, PREPARE, AND POLL MEASUREMENT. I CANN'T IDENTIFY WHERE THE PROBLEM IS. NEED HELP

3 REPLIES 3
John E KVAM
ST Employee

there are only a few ways to get this wrong.

1) you didn't power it on.

2) you did not power up pin 4 - GPIO0/CE Digital I/O Power-up default is chip enable(CE). It should be pulled high with a 47 ohm resistor.

3) I2C address confusion. 0x29 is the base address. That makes the write address 0x52 (0x29<<1) and the read address 0x53 (0x29<<1 | 1).

(this last is a product of the I2C specification, and I cannot do anything about that.)

Oddly I just brought up a new board with a VL53 sensor on it, and even I got the CE pin wrong to start with. Check that first.

  • john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
NASOK.1
Associate II

I enabled the gpio0(CE) high and checked my I2C address as you said, problem with that.

Hello all,
im using same setup but with vl6180-satel and im not sure if i need 4.7k ohm resistors on SDA and SCL lines. And how did you enabled GPIO0 ? with output from WB55 digital pin ? 

Thank you so much.