Skip to main content
Visitor II
February 24, 2021
Question

LSM6DS3 EVB "STEVAL-MKI160V1" communication issue using SPI 4 wire

  • February 24, 2021
  • 4 replies
  • 1788 views

Hello ST

here am using STEVAL-MKI160V1 in which LSM6DS3 is placed and an trying communicate with it over SPI.

Physical connections:

  • CS- CS
  • SCL- CLK
  • SDA - SDO of mc
  • SDO - SDI of mc
  • VDD - 3.3V
  • GND - GND

SPI Configuration:

  • SPI Freq- 1MHZ
  • Slave Select - Active low
  • Clock Phase - Read on ODD edge
  • clock polarity - Active High
  • bit order - MSB first

Am sending command "0x8F00"(WHO AM I-0F) over MOSI line and am not able to see response "0x0069" instead am seeing 0x0B00/0x0F00/0x0000 etc.. which is not consistent, I believe all the responses are wrong. Do I missing something in Physical connections or doing something wrong in SPI config ?. please help me

Seen VDDIO voltage level is 5V with out having any connection on it , but still VDDIO max is 3.7 as per data sheet , is that the issue ?

Do I need to make any additional connections or circuit on OCS/SCx/SDx/OSDO ??

Please do the needfull.

    This topic has been closed for replies.

    4 replies

    ST Employee
    February 24, 2021

    Hi @SChin.2​ ,

    >> Seen VDDIO voltage level is 5V with out having any connection on it, but still VDDIO max is 3.7 as per data sheet, is that the issue?

    Yes, this could be the issue, both in the case that Vdd = VddIO = 5V or Vdd < VddIO = 5V. In the former case, the most probable SPI MISO data you are likely to receive are 0xFF patterns, while in the latter case you might receive data different from 0xFF, since the Vdd is valid, but inconsistent since the internal digital logic of the sensor will not recognize the High / Low levels. Almost all the ST sensors are CMOS 3.3V and below logic compatible.

    Please note also that you could be in an out-of-absolute-maximum ratings condition described in the datasheet, p.27, i.e. 4.8V.

    Can you try lowering the VddIO and see what happens (if the part is not yet damaged)?

    -Eleon

    SChin.2Author
    Visitor II
    February 25, 2021

    Hello @Eleon BORLINI​ 

    Thanks for the quick response !

    How to lower the voltage on VDDIO, since here I just connected 3.3V to VDD and GND to GND ?

    Is VDDIO is input or output ?

    ST Employee
    February 25, 2021

    Hi @SChin.2​ ,

    VddIO is an input and determines the high and low level of the sensor digital output. One possibility is to tie it to Vdd, so that it will be equal to 3.3V and there will be no inconsistency in detecting the digital levels.

    You are using SPI so no need of external pull-ups to VddIO.

    -Eleon

    SChin.2Author
    Visitor II
    February 25, 2021

    Hello @Eleon BORLINI​ 

    After shorting VDD & VDDIO , I mean after supplying 3.3V to VDDIO am seeing 4.2V on both VDD and VDDIO. Is this a good or bad sign ?

    ST Employee
    February 25, 2021

    It means that there is a residual connection or a resistance partition between VddIO and probably the previous 5V supply...

    Could you share the schematic to check it?

    -Eleon

    SChin.2Author
    Visitor II
    February 25, 2021

    I don't have the Schematic of the EVB

    FYI am using this

    https://www.st.com/content/ccc/resource/technical/document/data_brief/0b/f5/7b/e2/d2/fe/44/75/DM00164425.pdf/files/DM00164425.pdf/jcr:content/translations/en.DM00164425.pdf

    if available can you please share the schematic of the EVB.

    SChin.2Author
    Visitor II
    March 22, 2021

    Hi @Eleon BORLINI​ 

    We have got the new part since the last one was got damaged because of 5v supply on VDDIO

    But still we are seeing same issue in getting the response for WHO AM I,

    SPI Configuration:

    • SPI Freq- 100KHZ
    • Slave Select - Active low
    • CPHA- 1
    • CPOL - 1
    • bit order - MSB first

    sent 0x8F00 on MOSI line and seen 0x0040 and it was random some times we are seeing 0x007F as a response.

     0693W000008xZEwQAM.jpg 

    ST Employee
    March 23, 2021

    Hi @SChin.2​ ,

    So there was also a problem related to 5V Vdd / VddIO voltage...

    I saw you (correctly) published a new post on this topic here.

    I'll go there for the (tentative) answer.

    -Eleon