cancel
Showing results for 
Search instead for 
Did you mean: 

I am seeing odd current behavior with the LSM6DSOX but not in LSM6DSM. Due to INT2 connection to slave interrupt?

KWine
Senior

Using LSM6DSM and LSM6DSOX in Mode 2 with LIS2MDL and LPS22HB slaves. Can toggle between passthru and master modes to idle slave sensors to cut power with the LSM6DSM. But with LSM6DSOX I see ~2.5 mA pulse at ~4 second intervals due to LIS2MDL.

LIS2MDL INT connects to LSM6DSX INT2 in the breakout design but LIS2MDL interrupt disabled. OK on the LSM6DSM but not LSM6DSOX.

Sleep/wake detect with LSM6DSOX also works fine when slave sensors idled in passthru before master mode, but when LIS2MDL nit idle I see the same behavior. 

Image with square wave excursion is with the LIS2MDL active, LSP22HB in idle mode, and LSM6DSOX in low power accel only mode (gyro powered down) after no motion detect.

Image with just sharp spikes is LIS2MDL power down and LSP22HB active with accel/gyro in same state.

So, could LIS2MDL interrupt pin connected to INT2 cause this odd current excursion? Could it be something else?0690X000009Yx46QAC.jpg0690X000009Yx41QAC.jpg

1 REPLY 1
KWine
Senior

So it seems that passthrough on the LSM6DSOX is not working once master mode is entered since the LIS2MDL continues to produce these 2.5 mA pulses even after I "enter" passthrough and idle the LIS2MDL. Due to the INT2 connection? My Passthrough method:

void LSM6DSO::passthruMode()
{
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_FUNC_CFG_ACCESS, 0x40);                    // enable sensor hub access
  uint8_t temp = _i2c_bus->readByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG);              // preserve MASTER_CONFIG 
  // START_CONFIG = bit 5, PASSTHRU = bit 4, PULLUP_EN = bit 3, MASTER_ON = bit 2
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG, temp | 0x20);               // set START_CONFIG bit (bit 5) to 1 to disable sensor hub trigger
  delay(5);
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG, (temp | 0x20) & ~(0x04));                 // set MASTER_ON bit (bit 2) to 0
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG, (temp & ~(0x04)) & ~(0x20));              // set START_CONFIG bit (bit 5) to 0
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG, ((temp & ~(0x04)) & ~(0x20)) & ~(0x08));  // set PULLUP_EN bit (bit 3)to 0
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_MASTER_CONFIG, 0x10);                      // enable pass through  
  _i2c_bus->writeByte(LSM6DSO_ADDRESS, LSM6DSO_FUNC_CFG_ACCESS, 0x00);                    // disable embedded functions
}