LIS2MDL embedded temperature sensor
Hello,
I try to use LIS2MDL embedded temperature sensor value, thru TEMP_OUT_L_REG and TEMP_OUT_H_REG. Data is signed 16-bit byte in 2’s complement and 8 LSB / °C. The four most
significant bits contain a copy of the sign bit.
At room temperature I read 0xFE20, so it is negative, so I convert in positive value with 2’s complement : NOT(0xFE20) + 1 = 480 in decimal. Then I div by 8 and I find 60, so -60°C.
What is wrong ?
Thanks
Best Regards
Thomas
