Skip to main content
Visitor II
September 22, 2020
Question

High current consumption on the LSM6DSM while checking for Activity

  • September 22, 2020
  • 3 replies
  • 2121 views

Hi,

I'm using a LSM6DSM to detect periods of inactivity and put a MCU to sleep. Similarly, it uses the activity interrupt to wake the MCU. I observed an average current consumption of ~0.7 mA when configured to check for inactivity(Gyro enabled and ODR is 52Hz for accel and gyro). The average current consumption of the LSM6DSM is ~0.38mA after the inactivity interrupt is triggered, even though I've set the Gyro to be powered down.

I've used the STMems Standard C drivers and below is the code snippet I've used to configure the inactivity interrupt:

	/* Reset IMU */
	lsm6dsm_reset_set(&dev_ctx, PROPERTY_ENABLE);
 do 
	{
 lsm6dsm_reset_get(&dev_ctx, &I2C_Response);
 } 
	while (I2C_Response);
	
	/* Enable Block Data Update */
 lsm6dsm_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
	
	/* Set full scale */
 lsm6dsm_xl_full_scale_set(&dev_ctx, LSM6DSM_2g);
 lsm6dsm_gy_full_scale_set(&dev_ctx, LSM6DSM_2000dps);
	
	/* Set Output Data Rate */
 lsm6dsm_xl_data_rate_set(&dev_ctx, LSM6DSM_XL_ODR_52Hz);
 lsm6dsm_gy_data_rate_set(&dev_ctx, LSM6DSM_GY_ODR_52Hz);
 
 lsm6dsm_xl_power_mode_set(&dev_ctx, LSM6DSM_XL_NORMAL);
 lsm6dsm_gy_power_mode_set(&dev_ctx, LSM6DSM_GY_NORMAL);
	
 lsm6dsm_int_notification_set(&dev_ctx, LSM6DSM_INT_LATCHED);
		
 lsm6dsm_wkup_threshold_set(&dev_ctx, 2);
 lsm6dsm_act_mode_set(&dev_ctx, 3);
 lsm6dsm_act_sleep_dur_set(&dev_ctx, 2);
	
 /* Set Accelerometer Data-Ready Interrupt */
 lsm6dsm_pin_int2_route_get(&dev_ctx, &int_2_reg);
 int_2_reg.int2_inact_state = PROPERTY_ENABLE;
 lsm6dsm_pin_int2_route_set(&dev_ctx, int_2_reg);
	

I have measured the average current consumption of my circuit with and without the LSM6DSM, so I believe these values to not be caused by the MCU. Is there anything wrong with this code or is there something I'm missing here??

Thanks in advance

    This topic has been closed for replies.

    3 replies

    ST Employee
    September 22, 2020

    Hi @GTS.1​ ,

    I'm not sure you are facing an issue, at least in normal mode. The Table 7 of the AN4987 application note shows the typical values of power consumption for the different operating modes. in the 52 Hz (High Perf.) case, Combo [Acc + Gyro] (at Vdd = 1.8 V), the average current consumption is 650uA, so it is in line with your tested 0.7mA.

    So, did you set the INACT_EN bits of the TAP_CFG according to the last configuration?

    0693W000004GhsiQAC.png

    If so, you may try to leave the interrupt pulsed, I'm wondering if the device is consuming from a parasitic path on INT pin (is your Vdd 1.8V?)

    -Eleon

    GTS.1Author
    Visitor II
    September 22, 2020

    Hi @Eleon BORLINI​ ,

    The datasheet mentions that the current consumption for the Accelerometer in Low power mode is 9.5 uA. I believe this should the be the average current consumption when INACT_EN is 3 and the LSM6DSM is checking for activity.

    I took a look at the implementation in the STMems Standard C Library and the lsm6dsm_act_mode_set function should set the INACT_EN bits

    Also, I commented out the code to set the interrupt to latched and I'm still seeing the same current consumption values.

    Thanks

    GTS.1Author
    Visitor II
    September 24, 2020

    Hi @Eleon BORLINI​ ,

    Sorry to ping you again but I'm stuck because of this issue. Any help would be appreciated.

    Also, I missed to answer this in my last comment. I did set TAP_CFG to the last configuration. And the VDD is 3V.

    Thanks

    ST Employee
    September 24, 2020

    Hi @GTS.1​ ,

    the device should consume little more when powered at 3V instead of 1.8V, on average. You have to include additional current consumption due to SPI or I2C communication in case you are running data acquisitions, especially if the Vdd and Vdd_IO are tied together. Reducing the SPI / I2C speed, you will reduce the average current consumption. Are you keeping on the data acquisition during the power down?

    -Eleon

    GTS.1Author
    Visitor II
    September 24, 2020

    Hi @Eleon BORLINI​ ,

    By data acquisition, I believe you are asking if I'm reading the Accelerometer or Gyroscope output registers. Once the inactivity interrupt is detected, the MCU is put to sleep, so there are no I2C transactions occurring between the MCU and the LSM6DSM once it's powered down.

    Are there any official figures on the average current consumption when VDD is 3V?

    Thanks