2019-06-25 12:16 AM
We are using the LSM6DSL chip in SPI mode with the FIFO_CTRL5 and the CTRL1_XL registers set to 26Hz.
The gyro is not used. CTRL6_C's XL_HM_MODE is set to '1' to disable high performance mode.
When we are not using the LSM6DSL we set both the FIFO_CTRL5 and the CTRL1_XL registers to zero to go into power down mode. When in power down mode our board consumes about 60ua. When we set FIFO_CTRL5 = 0x16 CTRL1_XL=0x20 (CTRL6_C=0x18 is not changed) the board consumes 240ua.
What could be our problem?
2019-06-26 12:25 AM
Hi @Community member , in the Accelerometer only configuration, 26Hz ORD (low power), the LSM6DSL should consume 14uA @ Vdd 1.8V. When both axl and gyro in PD mode, the device should consume 3uA (this is the condition just after the boot at start-up). Which is your Vdd and VddIO values? Do you have any pull-up on the CS line?
Ps: is the Gyro correctly disabled (CTRL2_G (11h) is 0h)?
Regards
2019-06-26 02:23 AM
I am the software person but I can get the information from the hardware engineer.
I am almost certain that our Vdd & VddIO are about 3.3VDC.
The CS line is connected directly to our microcontroller which is configured with an internal pull-up but we can try when not reading with the SPI interface to change to to no pull-up. Yes CTRL2_G is is zero.
Thanks
2019-06-26 05:17 AM
At that Vdd Level the current supply is of course higher than the reported consumption (however not so high...). Even if consuming high, are the axl and gyro outputs consistent? Do you have the possibility to test another samples, to make sure it is not a device-related issue? Regards
2019-06-26 05:23 AM
I will forward your request to the hardware engineer in the USA and if he needs help, I hope to discuss this with him tomorrow morning.
The board is sitting on a calm table so the readings are usually pretty stable if that is what you mean.
We do not activate the gyroscope.
Maybe the hardware guy can test another board.
Thanks
2019-06-27 05:33 AM
This morning, we tested another board but the current was pretty much the same. We saw that the accelerometer Axes readings were stable and when we changed the board's direction the Axes changed accordingly but were stable with a few points of play. We do not use the gyroscope CTRL2_G is zero. The CS is a steady '1' logic when I do not empty the FIFO every 20 seconds. The hardware guy removed a pull-up resistor on the CS line just for testing and it had no effect as the line is normally '1' and the pull-up is just for power up.
Thanks
2019-06-28 01:47 AM
Hi Daniel, thanks for your tests and confirmation. Can you please check which is the current consumption in continuous mode (not FIFO)? Regards
2019-06-30 11:10 PM
Sorry! I found the stupid problem in my code. I store in our EEPROM the LSM6DSL's configuration which after reset is written to the LSM6DSL. This includes the CTR2_G register. Now we get only a 20ua difference between no LSM6DSL frequency (Power-down) and the 26Hz frequency continuously running which is what we expected.
Writing things backwards can have it drawbacks. Instead of last-first+1, I wrote first-last+1 .
===================================================================================
#define AQUA_LOCAL_MODBUS_SENSOR_FIRST_CFG_REG 220
#define AQUA_LOCAL_MODBUS_SENSOR_LAST_CFG_REG 245
Old code:
for (i=0;i<(AQUA_LOCAL_MODBUS_SENSOR_FIRST_CFG_REG-AQUA_LOCAL_MODBUS_SENSOR_LAST_CFG_REG+1);i++){
ami_SENSOR_WriteReg(lsm6ds33_ConfigAddr[i],config.sensor.cfgreg[i]);
}
New Code:
for (i=0;i<(AQUA_LOCAL_MODBUS_SENSOR_LAST_CFG_REG-AQUA_LOCAL_MODBUS_SENSOR_FIRST_CFG_REG+1);i++){
ami_SENSOR_WriteReg(lsm6ds33_ConfigAddr[i],config.sensor.cfgreg[i]);
}