2021-12-12 10:10 PM
Operating Voltage:3.3V
The initial configuration of lsm6dsl is as follows
/**
* @brief Initialize the LSM6DSL sensor
* @param pObj the device pObj
* @retval 0 in case of success, an error code otherwise
*/
int32_t LSM6DSL_Init(void)
{
/* Enable register address automatically incremented during a multiple byte
access with a serial interface. Enable IF_INC */
if (lsm6dsl_auto_increment_set(PROPERTY_ENABLE) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* Enable BDU */
if (lsm6dsl_block_data_update_set(PROPERTY_ENABLE) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* FIFO mode selection. LSM6DSL_STREAM_MODE*/
if (lsm6dsl_fifo_mode_set(LSM6DSL_BYPASS_MODE) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* Full scale selection. */
if (lsm6dsl_xl_full_scale_set(LSM6DSL_2g) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* Full scale selection. LSM6DSL_2000dps*/
if (lsm6dsl_gy_full_scale_set(LSM6DSL_2000dps) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* Output data rate selection - LSM6DSL_GY_ODR_104Hz */
if (lsm6dsl_gy_data_rate_set(LSM6DSL_GY_ODR_104Hz) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
/* Output data rate selection - LSM6DSL_XL_ODR_104Hz */
if (lsm6dsl_xl_data_rate_set(LSM6DSL_XL_ODR_104Hz) != LSM6DSL_OK)
{
return LSM6DSL_ERROR;
}
return LSM6DSL_OK;
}
In the process of detecting the power consumption of the sensor, it was found that the power consumption of lsm6dsl reached 2mA or even more. It can be shown in the user manual that the power consumption of the high-performance mode is 0.6mA, I don’t know why it is so high?
2021-12-20 03:01 AM
Hi @Slong.1 ,
my first guess is that the extra power consumption could be coming from the hardware connections of LSM6DSL pins.
Can you please check pin 10 and pin 11 configuration? They should be left unconnected. Otherwise, as reported in the datasheet, p.47, they have:
In addition, are you using SPI or I2C protocol?
-Eleon