Author Topic: LIS3MDL pololu, bad readings via SPI.  (Read 1138 times)

0 Members and 1 Guest are viewing this topic.

Offline eejamTopic starter

  • Newbie
  • Posts: 1
  • Country: pt
LIS3MDL pololu, bad readings via SPI.
« on: August 27, 2016, 12:34:46 am »
Hi, is there any one with experience with the LIS3MDL sensor, and SPI !?

I've implemented, some code to read from the LIS3MDL via SPI, and it works, except that values are always noisy and extremely high.

I know that, because, reading from the same device via I2C, gives-me stable (low noise) values, with accurate behavior. E.g. if I bring a magnet near the sensor, the sensor modulus of the magnetic vector, behaves accordingly to the distance of the magnet, as for in SPI it doesn't ...

I've checked, the SPI clock mode, and from the data sheet (http://www.st.com/content/ccc/resource/technical/document/datasheet/54/2a/85/76/e3/97/42/18/DM00075867.pdf/files/DM00075867.pdf/jcr:content/translations/en.DM00075867.pdf) seems to be MODE3. I'm using a low clock speed (100kHz), and tried other combinations with same result.

Somehow it seems I have a misbehavior in the sensor via SPI ...

Any one with experience in this sensor, and SPI to give-me some hint?

Thanks,
BR,
mc
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf