[SOLVED] Reading temperature sensor on LIS2DE12 via I2C
I have implemented in our product a LIS2DE12 sensor. I would like to read the temperature register via I2C.
In order to do this I setup the following register:
at start-up:
-check WHO_AM_ I register (0x0Fh) which correctly reports 0x33h (so I2C bus and LI2DE12 is alive).
-register CTRL_REG0 (0x1Eh) to 0x90h (i.e. SDO/SA0 disconnected from pull-up because it is connected to GND on the PCB).
-register TEMP_CTRL_REG (0x1Fh) to 0xC0h (i.e. enabling the temperature sensor reading).
-register CTRL_REG1 (0x20h) to 0x18h (i.e. ODR set to 1Hz and Lpen bit set '1' as stated in datasheet).
at run-time:
-read STATUS_REG_AUX(0x07h) and check TOR bit is '0' and TDA bit is '1'.
-if it is OK, read OUT_TEMP_L (0x0Ch) register.
However STATUS_REG_AUX always reports 0x44h (i.e. temperature data overrun occured). Even if I discard checking the TOR and TDA bit, the register OUT_TEMP_L is always 0x00.
Is there a different procedure to read the temperature sensor?
Thanks
