lsm6dsl在应用手册显示,高性能模式的功耗是0.6mA,但我在实际使用过程中,功耗达到2mA。
在3.3V电压下,一以下是我的配置
/**
* @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;
}
发现一但配置频率,对加速度计没有影响,但是磁力计配置之后,功耗直线上升,这是什么原因呢?