2020-07-13 05:09 AM
Hello ST Community,
My application involves nRF52 series processor which interfaces with LIS2DH12 via SPI and I am trying to reduce the power consumption as much as possible when the processor is in sleep mode.
I understand that, as soon as power is applied, the sensor is in power-down mode. In this mode (i.e no SPI commands sent to the sensor), the total power consumption is ~ 6 uA with the processor in sleep mode.
Now, the processor can wake up or go to sleep mode when certain commands are received via NFC.
I am using LIS2DH12 to generate interrupts for impact , freefall and wakeup and so, I configure the sensor with register values as follows:
CTRL1_REG - 0x37
CTRL3_REG - 0x40
CTRL4_REG - 0x88
CTRL5_REG - 0x0A
CTRL6_REG - 0x28
INT1_THS - 0x0B
INT1_DUR - 0x0A
INT1_CFG - 0x95
INT2_THS - 0x4E
INT2_DUR - 0x01
INT2_CFG - 0x2A
ACT_THS - 0x05
ACT_DUR - 0x20
When the command to wake up is given, the sensor LIS2DH12 is configured as shown above and the functionality is as expected. In this case, the power consumption is ~ 12 uA. Now, if the command to sleep is given again, I want to minimise power consumption and so, I send the command to put the LIS2DH12 in power down mode as follows before putting the processor to sleep:
Read REFERENCE Register (0x26)
Write value 0x00 to CTRL1_REG
However, in this case, the power consumption is at 8 uA even though the power-down command was sent. I also confirmed that this extra 2 uA is from LIS2DH12 by not initialising the sensor at all. In this case, on power up, power consumption is 6 uA and when the command to sleep is given after it is woken up, it goes back to 6 uA.
Could you please let me know if I am following the right process to set the sensor in power-down mode?
Thanks in advance.
Regards,
Anusha
2020-07-13 08:31 AM
Hi @AB.4 , the procedure of reading REFERENCE Register and setting 0x00 to CTRL1_REG should be the correct one to enter power-down mode... Btw, which Vdd level are you using? 1.8V or higher? And are the SPI lines left open-drain during PD mode? If you are sure this is not a nRF52 application processor issue, I suggest you to check the LIS2DH12 C drivers on Github repository, if they can be of any help for you. Regards
2020-07-14 09:43 AM
Hi Eleon,
Thanks for your response.
I came across this note in the datasheet regarding 'Sleep-to-wake and Return-to-sleep' which mentions that when the acceleration goes below threshold value, ODR[3:0] are not considered (Page 18, section 3.2.4 in https://www.st.com/resource/en/datasheet/lis2dh12.pdf). In my setup, I am using the register ACT_THS. The power-down mode is enabled in the sensor by writing to CTRL1_REG when the device acceleration is already below the threshold in ACT_THS. So, if the sensor's acceleration is below ACT_THS value and power-down mode is enabled, will it still remain in low-power mode only?
Regards,
Anusha