2016-06-22 10:45 AM
I am using the LIS3MDL magnetometer on a custom PCB I recently designed. In addition to the sensor, the PCB has an STM32F101 and a HopeRF LoRa radio. I am measuring current consumption by the LIS3MDL much larger than that stated in the data sheet. I've also measured higher than stated current consumption on the ST evaluation board.
Has anyone else seen higher than stated values? Are the datasheet numbers accurate? FYI I'm using SPI interface and I've tried active high and active low interrupt config as well. I've also verified DRDY rate of 20Hz. Thanks!Test &sharp1: Total board current of 185uA (uP in stop mode with interrupts disabled, radio in sleep mode, LIS3MDL in power down mode)
Test &sharp2:
Total board current of
780uA (uP in stop mode with interrupts disabled, radio in sleep mode, LIS3MDL in 20Hz ODR low power mode).I'm able to see baseline current consumption in the sensor when changing modes. Running sensor at 20Hz low power mode adds 595uA (vs 40uA from datasheet).
Sensor config code for Test &sharp2:
// Control register 1 & 4:
LIS3MDL_set_ODR
(
ODR_20HZ
)
;
// Control register 2:LIS3MDL_set_FS
(
FS_4GAUSS
)
;
// Control register 3:tmp
=
0x00
;
LIS3MDL_write
(
REG_CTRL_REG3
,
1U
,
&
tmp
)
;
// Control register 5:tmp
=
0x00
;
LIS3MDL_write
(
REG_CTRL_REG5
,
1U
,
&
tmp
)
;
// Interrupt configuration.tmp
=
0x25
;
LIS3MDL_write
(
REG_INT_CFG
,
1U
,
&
tmp
)
;
// Interrupt threshold registers.LIS3MDL_set_detect_threshold
(
THRESHOLD_DEFAULT
)
;
tmp
=
((
abs
(
LIS3MDL_get_detect_threshold
())
&
0xFF00
)
>>
8U
)
;
LIS3MDL_write
(
REG_INT_THS_H
,
1U
,
&
tmp
)
;
tmp
=
(
abs
(
LIS3MDL_get_detect_threshold
())
&
0x00FF
)
;
LIS3MDL_write
(
REG_INT_THS_L
,
1U
,
&
tmp
)
;
// Read data once to clear out interrupt. LIS3MDL_read(
REG_OUT_Z_H
,
1U
,
&
tmp
)
;
#lis3mdl2018-01-11 01:42 AM
That is the reason why I2C-bus did not work when I just connect SA1 to VDD. This effects to device address. Thanks a lot for a help!
2018-12-17 05:45 PM
Hi, whereabouts did you find that SDO is internally pulled up? I cannot see this is the datasheet.
2018-12-18 12:02 AM
This was the problem, that the behavior is not mentioned in the datasheet. You can only measure it. I had the same problem if you can read, then my answer below will confirm the behavior which mattwo has found.
2018-12-18 04:44 PM
Hi Miroslav,
Are you able to confirm with sensor specialist if pin 9 is internally pulled up or not?
2018-12-18 04:45 PM
This seems strange that this isn't controllable too.
On the LIS3DH you can enable/disable the pullup with a register.
2018-12-18 05:16 PM
This appears to be the case, can someone please explain why this behavior is not mentioned in the datasheet, and if this is configurable via a register; similar to the LIS3DH .
2019-09-12 04:00 AM
Hello,
I came across the same issue with the LIS3MDL and found this thread here. Finally I got confirmation from STM, that the SA1 pin is really pulled high internally. Really annoying, that this has still not being added to the data sheet since over the last three years from when this thread started.
Additionally I got the information from STM that the internal pullup resistor can be disabled by setting bit zero of register 0x1B while keeping the rest of the register at their original values. In the data sheet this register is mentioned as "reserved".
So with disabling the internal pull up the current consumption in power down mode is as low as few µA as expected.
Hope that helps,
ER!K
2020-06-18 07:49 PM
Hi Mattwo,
Your post saved me. Thanks a lot!
Even In the lasest datasheet, it is still described as "When the I2C interface is used, the SDO/SA1 pin has to be connected to Vdd_IO or GND." without any warning. So much missleading. There would still be 50% opportunity for anyone new to get stucked here.
2021-05-15 03:41 AM
Thanks all of you for confirming the issue and workarounds!
It's May/2021 and still the same undocumented trap. I've spent/wasted **2 full days** of my life fighting this.
Thanks ST for still not documenting this in the datasheet... I'll keep it in mind for future sensors selection.
2021-05-21 01:03 AM
Let me try to notify internally this omission again...
-Eleon