2015-09-16 02:35 AM
Hi all,
I am testing a board that uses a LIS3MDL as a magnetic reference sensor communicating with a 3-wire SPI. I am testing the sensor using a Helmholtz coil that I built (that, by the way, has been tested and generates correctly the magnetic field). When reading the magnetic data from the LIS3MDL I see that magnetic data tracks correctly the generated magnetic field for positive fields. However, negative magnetic fields are not correctly measured and show a different slope in a Breal vs B measured plot. This error in the measurement is far higher than the +-0.12% nonlinearity expected from this device. I have tested three prototype boards and all of them have this issue. I have studied the raw binary data coming from the sensor and I have discarded any conversion from binary to Gauss error. So finally, my question is: Is this performance normal? Are the three sensors damaged in the same way? Has anybody had the same problem? Should I give up and work with it? Thanks! #spi2015-10-21 07:59 AM
Be careful using this device and several others from ST over SPI. If you are sharing the SPI bus, the notion of Chip Select (CS) doesn't work right. This device and others, when NOT selected are actually in I2C mode. If any of these devices see their respective I2C slave addresses on the shared SPI bus, they can and will drive the SDI line corrupting data to/from the device that is actually selected. I found this the hard way.