Skip to main content
Visitor II
July 2, 2020
Question

How to completely power down the lsm9ds1?

  • July 2, 2020
  • 2 replies
  • 1183 views

I'm using the lsm9ds1 as part of a bought module - the arduino nano 33 ble - which can achieve very low power (micro amps) in a power down mode.

However, If I initialize and read accel and gyro data from the IMU, afterwards I can't find a way to get back to those low values and I get stuck in the milliamps.

What sequence of writes should I send to the LSM registers in order to power it down as much as possible?

I'm currently using this sequence for the power down:

LSM9DS1_CTRL_REG3_M = 0x03

LSM9DS1_CTRL_REG1_G = 0x00

LSM9DS1_CTRL_REG6_XL = 0x00

NOTE- the mcu communicates with the LSM using i2c.

    This topic has been closed for replies.

    2 replies

    ST Employee
    July 6, 2020

    Hi @PRebo.1​ , the register settings seem OK... are all the other register to zero 00h or in their default configuration? I suggest you to try to pass through a SW reset by enabling the SW_RESET bit in CTRL_REG8 (22h) register. You can also check the standard C mems drivers on Github for the LSM9DS1 module (LINK).

    /**
     * @brief Software reset. Restore the default values in user registers.[set]
     *
     * @param ctx_mag Read / write magnetometer interface definitions.(ptr)
     * @param ctx_imu Read / write imu interface definitions.(ptr)
     * @param val Change the values of sw_reset in reg CTRL_REG8.
     * @retval Interface status (MANDATORY: return 0 -> no Error).
     *
     */
    int32_t lsm9ds1_dev_reset_set(stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu,
     uint8_t val)
    {
     lsm9ds1_ctrl_reg2_m_t ctrl_reg2_m;
     lsm9ds1_ctrl_reg8_t ctrl_reg8;
     int32_t ret;
     
     ret = lsm9ds1_read_reg(ctx_imu, LSM9DS1_CTRL_REG8, (uint8_t*)&ctrl_reg8, 1);
     if(ret == 0){
     ctrl_reg8.sw_reset = (uint8_t)val;
     ret = lsm9ds1_write_reg(ctx_imu, LSM9DS1_CTRL_REG8,
     (uint8_t*)&ctrl_reg8, 1);
     }
     if(ret == 0){
     ret = lsm9ds1_read_reg(ctx_mag, LSM9DS1_CTRL_REG2_M,
     (uint8_t*)&ctrl_reg2_m, 1);
     }
     if(ret == 0){
     ctrl_reg2_m.soft_rst = (uint8_t)val;
     ret = lsm9ds1_write_reg(ctx_mag, LSM9DS1_CTRL_REG2_M,
     (uint8_t*)&ctrl_reg2_m, 1);
     }
     
     return ret;
    }

    Regards

    PRebo.1Author
    Visitor II
    July 6, 2020

    Thank you.

    In the end the problem was elsewhere.