AnsweredAssumed Answered

LIS2DH12 temperature and acceleration always read the same

Question asked by Jeff Thompson on Jun 1, 2017
Latest reply on Jul 6, 2017 by Jeff Thompson

I've got my LIS2DH12 configured as follows:

 

TEMP_CFG_REG
TEMP_EN0x11
CTRL_REG1
ODR1
LPEN0
ZEN1
YEN1
XEN1
CTRL_REG2
HPM0
HPCF0
FDS0
HPCLICK0
HP_IA10
HP_IA20
CTRL_REG3
I1_CLICK0
I1_IA10
I1_IA20
I1_ZYXDA0
I1_WTM1
I1_OVERRUN0
CTRL_REG4
BDU1
BLE0
FS0
HR1
ST0
CTRL_REG5
BOOT0
FIFO_EN1
LIR_INT10
D4D_INT10
LIR_INT20
D4D_INT20
CTRL_REG6
I2_CLICK0
I2_IA10
I2_IA20
I2_BOOT0
I2_ACT0
INT_POLARITY1
REFERENCE
REF0
FIFO_CTRL_REG
FM1
TR0
FTH1
INT1_CFG
AOI1
6D0
ZHIE0
ZLIE0
YHIE0
YLIE0
XHIE0
XLIE0
INT1_THS
THS1
INT1_DURATION
D0
INT2_CFG
AOI1
6D0
ZHIE0
ZLIE0
YHIE0
YLIE0
XHIE0
XLIE0
INT2_THS
THS0
INT2_DURATION
D0
CLICK_CFG
ZD0
ZS0
YD0
YS0
XD0
XS0
CLICK_THS
LIR_CLICK0
THS0
TIME_LIMIT
TLI0
TIME_LATENCY
TLA0
TIME_WINDOW
TW0
ACT_DUR
ACTD0

After configuration, the registers look like this:

whoAmI 33
tor 1
tda 1
sdoPuDisc 0
tempEn 1
odr 1
lpen 0
zEn 1
yEn 1
xEn 1
hpm 0
hpcf 0
fds 0
hpclick 0
hpIa1 0
hpIa2 0
i1Click 0
iaIa1 0
iaIa2 0
i1Zyxda 0
i1wtm 1
i1Overrun 0
bdu 1
ble 0
fs 0
hr 1
st 0
sim 0
boot 0
fifoEn 1
lirInt1 0
d4dInt1 0
lirInt2 0
d4dInt2 0
i2Click 0
i2Ia1 0
i2Ia2 0
i2Boot 0
i2Act 0
intPolarity 1
reference 0
fm 1
tr 0
fth 1
wtm 0
ovrnFifo 1
empty 0
fifoFss 1
aoiInt1 1
sixdInt1 0
zhieInt1 0
zlieInt1 0
yhieInt1 0
ylieInt1 0
xhieInt1 0
xlieInt1 0
int1Ths 1
int1Duration 0
aoiInt2 1
sixdInt2 0
zhieInt2 0
zlieInt2 0
yhieInt2 0
ylieInt2 0
xhieInt2 0
xlieInt2 0
int2Ths 0
int2Duration 0
x: -32640, y: 0, z: -32640

 

Every second, I get and service an interrupt (INT 1). Here's what I find (lowercase = not set (0) , UPPERCASE = set (1), bitnames followed by: value indicate values read):

 

outTemp: 0
INT1_SRC: ia zh zl yh yl xh xl
INT2_SRC: ia zh zl yh yl xh xl
CLICK_SRC: ia dclick sclick sign z y x
STATUS_REG_AUX: TOR TDA
STATUS_REG: ZYXOR ZOR YOR XOR ZYXDA ZDA YDA XDA
FIFO_SRC_REG: WTM ovrn_fifo empty
FSS: 2
x: -32640, y: 0, z: -32640
x: -32640, y: 0, z: -32640
outTemp: 0

 

As you can see, I read and output the x-, y-, and z-axis values, along with the temperature. Unfortunately, they never change, no matter how I orient the board the device is mounted on. Has you seen this before or have an idea of what I might be doing wrong? I know I'm communicating properly with the device, because WHO_AMI_I comes back as 33.

Outcomes