Showing results for 
Search instead for 
Did you mean: 

Difficulty Putting LSM303AGR to Sleep

Jason Wilbee
Associate II
Posted on August 01, 2017 at 20:37


I am attempting to integrate the♯/?tags=lsm303agr

 into an existing product and I am having difficulties bringing down the power consumption of the LSM303AGR to reasonable levels. As I understand it, the module should be consuming only around 3uA or so when idling, but I am seeing more like 300uA, which seems to be inline with power consumption while the magnetometer is taking measurements.

The steps I am taking to put the device into sleep mode are clearing the ODR[3:0] on CTRL_REG1_A which the datasheet indicates should put the accelerometer in power down mode and setting bits MD[1:0] in CFG_REG_A_M. After writing to these registers I read them back to confirm that the changes occur. For reference I am communicating with the module over I2C.

Are there any known bugs with sleep mode or possible gotchas that could be responsible with the issues I am seeing?



#sleep-mode #lsm303agr #lowpower-sleep #sleep
Miroslav BATEK
ST Employee
Posted on August 03, 2017 at 14:00

There is no bug with the sleep mode.

Can you please measure the current consumption before you configure the sensor? The sensor starts-up in power down mode so you can check the current consumption in this mode. If the current after start-up is not as expected, there could be some additional current caused by pull-up or pull-downs, it this case I would need to check zour schematic.

Posted on August 03, 2017 at 19:50

I have tested both with my hardware configuration and with an MKI172V1 eval kit. On the eval kit I am only hooking up VDD, VDDIO, and GND and with an input voltage of 1.8V(on VDD and VDDIO) sleep mode seems to work, however, running the part at anything above that like 2.5V or 3.6V I see a high idle current like I mentioned above.

Posted on August 14, 2017 at 11:24

If you share your schematic I can check it.

Posted on August 14, 2017 at 19:57

Unfortunately I cannot release the schematic as it is a customers although, like I said above, I see the same behaviour on the MKI172V1 eval kit with VDD and VDDIO hooked up to 2.5V or 3.6V. So the schematic here

  is what I am using to attempt to validate. The only connection I have made are VDD, VDDIO, and GND (connected directly to a power supply/multimeter) so there is no chance that I am accidentally communicating with the module. With this setup (3.6V on VDD and VDDIO) I get an idle current of around 0.3mA, which is around 100x higher than it should be.
Posted on August 21, 2017 at 11:15

Hello Jason,

finally I was able to replicate your issue. Please try to connect INT3 pit on STEVAL-MKI172V1 to Vcc or GND through some resistor (i.e. 100kohms). It seems the pin 7 (INT_MAG/DRDY) of LSM303AGR cannot be left unconnected and must have pull-up or pull-down. If I did it the current consumption was as expected. I have contacted sensor specialist to investigate more this issue.
Posted on August 23, 2017 at 10:55

Hello Jason,

software solution is to set bit INT_MAG_PIN or INT_MAG in register CFG_REG_C_M (62h).

Basically the magnetometer interrupt pin cannot be left floating.