cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS1 SPI not working

Vincenzo Scianni
Associate
Posted on February 26, 2017 at 23:32

Hello.

I´m having problems on SPI reading WHO_AM_I register of a LSM9DS1 mounted on STEVAL-MKI159V1 : the correct answer is 0x68 but very often I got 0x28. The suspect that the level of bit 6 was not correctly set is confirmed by some traces of the oscilloscope but I need to say that:

1) Attaching probes fixes the problem : for some reasons the loads of probes solve the problem.

2) I got the two attached pictures during the initialization of the board or shaking a little bit cables of a second circuit on a breadboard.

  Summarizing the situation : in normal condition I got very often the incorrect value 0x28 but when I connect probes the problem disappears and I have always the correct value 0x68. Only in some conditions - initialization phase in the first 10 seconds or shaking a little bit some connection cables of a breadboard - I got the two attached pictures. I read a post of an user with a similar problem but the conclusion of the story was a suspected damage of the component during the soldering : in my case I bought two STEVAL-MKI159V1 and both have the same problem ...

Let me close adding that I connected STEVAL to a Pic18F25K80 with a SPI clock at 4 MHz.

Thank you and best regards,

Scianni Vincenzo

1 REPLY 1
Vincenzo Scianni
Associate
Posted on March 02, 2017 at 02:09

Hello.

Thanks to my colleague Laurent, I found the problem : for a wrong configuration of the pin connected to CS_M - the chip select of magnometer - this pin was always driven low so Magnometer and Accelerometer/Gyroscope were addressed at the same time and, because SDO_A/G and SDO_M share the same MISO line, then the problem.

Regards,

Scianni Vincenzo