cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX LPn pin behavior/usage

kwc
Associate III

I'm testing the VL53L5CX and finding that the behavior of the LPn pin differs from what is described in the datasheet. The datasheet says "Drive this pin to logic 0 to disable the I2C comms when the device is in LP mode. Drive this pin to logic 1 to enable I2C comms in LP mode." Also, section 2.2 (Power state machine) says that the device starts up in the HP idle state and I2C communication is disabled if LPn is used in LP idle state.

However, I'm finding that the LPn pin only seems to have an effect in (what I think is) the HP idle state. Here is part of the code I'm using to test (along with the ULD):

  status = vl53l5cx_set_power_mode(&Dev, VL53L5CX_POWER_MODE_SLEEP);
  if(status)
  {
    printf("vl53l5cx_set_power_mode failed, status %u\n", status);
    return status;
  }
  printf("VL53L5CX is now sleeping\n");
 
  while (1)
  {
    status = vl53l5cx_is_alive(&Dev, &isAlive);
    if(!isAlive || status)
    {
      printf("VL53L5CX not detected at requested address\n");
      printf("status: %u\n", status);
    }
    else
    {
      printf("VL53L5CX detected\n");
    }
    WaitMs(&(Dev.platform), 1000);
  }

I assume that VL53L5CX_POWER_MODE_SLEEP corresponds to the LP idle state. If I run this code as-is, the I2C communication succeeds ("VL53L5CX detected" is printed) whether LPn is high or low. However, if I replace VL53L5CX_POWER_MODE_SLEEP with VL53L5CX_POWER_MODE_WAKEUP (which I assume selects the HP idle state), or if I don't call vl53l5cx_set_power_mode() at all, then LPn seems to disable I2C comms as intended (with LPn high, I see "VL53L5CX detected"; with LPn low, I see "VL53L5CX not detected at requested address").

Is LPn in fact supposed to disable I2C only in the HP idle state, and is the documentation wrong about it only having an effect in the LP idle state?

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

I just got the official reply, "This is correct. The LPN pin is used when you want to change the I2C address of the VL53L5. It serves no other purpose."

So I agree with you, but given the purpose of the pin, it works.

But on has to agree that the name of the pin is really, really poor.

Has nothing to do with power.

  • 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.

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

I just got the official reply, "This is correct. The LPN pin is used when you want to change the I2C address of the VL53L5. It serves no other purpose."

So I agree with you, but given the purpose of the pin, it works.

But on has to agree that the name of the pin is really, really poor.

Has nothing to do with power.

  • 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.