Skip to main content
Visitor II
December 5, 2017
Question

LSM6DSL: WHO AM I Value not valid.

  • December 5, 2017
  • 4 replies
  • 3498 views
Posted on December 05, 2017 at 22:19

I want to access the LSM6DSL via SPI. And I ´m always recieving 0x40, when I read the WHO AM I register. I expect 0x6A. I am sending 0x8F to read the WHO AM I register.. Any Idea why I am not recieving the right value?

    This topic has been closed for replies.

    4 replies

    Visitor II
    December 6, 2017
    Posted on December 06, 2017 at 08:09

    question might be stupid, but did you set SPI datasize to 8bit?

    Visitor II
    December 12, 2017
    Posted on December 12, 2017 at 12:15

    Hi all,

         I got the same problem during read WHO AM I regiester, and I am sure that 8bit SPI set.

         Below is the time frames capture by LA. You can see that some jitters in SDO but the result of WHO AM I

         was 0x40.

         Do anybody can help this issue?

    0690X00000609CFQAY.png
    ST Employee
    December 13, 2017
    Posted on December 13, 2017 at 09:49

    I guess there is ringing on the clock edges and the sensor sends the data very quickly which you don't see on the logic analyzer. Actually you can see the short spike. Can you please decrease the clock speed and/or reduce the speed of GPIO pin which is used for SPI signals?

    Visitor II
    December 15, 2017
    Posted on December 15, 2017 at 01:18

    Hi

    Batek.Miroslav

    Batek.Miroslav

    Thank you for reply. But the clock was just about 500KHz and the spec announce they can accept 8MHz.

    By the way, even MCU can detect the jitter, the result will not be 0x6A as spec announce.

    Actually, I have reduce to 200KHz, but the result was the same.

    Visitor II
    December 27, 2017
    Posted on December 27, 2017 at 05:00

    Hi All,

       I found the root cause.

       If VCC input set as 1.8V, SPI_MISO would output correct.

       If VCC input set over 2.2V, SIP_MISO would output as wrong data.

       Below 2 picture with the same code to read register 0x0F (WHO AM I)

       VCC 1.8V output 0x6A but VCC 2.2V output 0x40 

    Visitor II
    January 18, 2018
    Posted on January 18, 2018 at 08:26

    Hi,

    I solved the problem by adding a 100 ohm resistor in series on the MISO line...

    ST Employee
    January 18, 2018
    Posted on January 18, 2018 at 14:54

    OK, good. I confirms my assumption that there was ringing on the edges.