Question
LSM303D // Compass X,Y & Z's MSB locked
Posted on March 26, 2015 at 14:53
Hey there,
I recently installed a new LSM303D (accelerometer + compass) on my board and I am having some issues with it. I can read the data from the accelerometer fine, but the ones from the compass seem ''locked'', I read a total of 3 pairs of MSB-LSB, of which only the LSB change over time. Here is an exemple of reading (LSB on the left):Mag X:
-125
-1
Y:
-93
-1
Z:
-22
-1
Mag X:
-115
-1
Y:
-101
-1
Z:
-26
-1
Mag X:
-119
-1
Y:
-78
-1
Z:
-34
-1
The LSBs change erratically regardless of the orientation of the sensor.
Here is the config I'm using:
ST_CTRL_REG
1
,
0
x
67
ST_CTRL_REG
5
,
0
x
60
ST_CTRL_REG
6
,
0
x
00
ST_CTRL_REG
7
,
0
x
80
I am using SPI. I don't really get how I am not getting the values right.
Any help or lead would help me a lot :)
Thanks !