Skip to main content
Visitor II
March 23, 2021
Solved

LSM6DS3 EVB "STEVAL-MKI160V1" communication issue with WHO AM I

  • March 23, 2021
  • 5 replies
  • 2917 views

Hi ST

we are seeing wrong response for WHO AM I command,

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. can you please help us on this 0693W000008xcw8QAA.jpg

    This topic has been closed for replies.
    Best answer by SChin.2

    Hello @Eleon BORLINI​ 

    found the root cause for it, MISO line is with high impedance , just need to place the resistance to avoid reflections on the line. In my case we have added 20ohms resistor is added.

    5 replies

    SChin.2Author
    Visitor II
    March 23, 2021

    Can some one help me on this please !

    SChin.2Author
    Visitor II
    March 23, 2021

    Hi @Eleon BORLINI​ 

    Can you please help me on this, as this is on high priority for me and we are blocked with this.

    ST Employee
    March 23, 2021

    Hi @SChin.2​ ,

    No guess so far, the CS, CLK and MOSI lines looks OK. MISO line and Channel 3 (I suppose it is the scope waveform). not so good...

    For this reason, I'm wondering if it could be an "hardware" problem. Did you correctly set all the pins from the application processor side, and in particular the SCx and SDX pins, as stated in the datasheet p.9?

    -Eleon

    SChin.2Author
    Visitor II
    March 23, 2021

    Hello @Eleon BORLINI​ 

    Are you refereeing me to P.19 (Table 2. Pin description).

    Here my connections description :

    VDDIO-->3.3V

    VDD-->3.3V

    GND-->GND

    CS--> Chip Select of MC

    SCL-->Clock of MC

    SDA-->serial data output line of MC

    SDO-->serial data input line of MC

    Reset all pins are left not connected (NC)

    ST Employee
    March 23, 2021

    Please note that the SDx and SCx pins (in Mode 1 function, i.e. LSM6DS3 slave configuration) have to be connected to VDDIO or GND, even if they are not used.

    0693W000008xhYWQAY.png 

    -Eleon

    SChin.2Author
    Visitor II
    March 24, 2021

    Hello @Eleon BORLINI​ 

    As we see it is working fine with the I2C lines for reading the WHO AM I register, but as mentioned above it is not working as expected over SPI lines.

    can we take this post to high priority please,

    0693W000008xkoMQAQ.jpg 0693W000008xkoRQAQ.jpg

    ST Employee
    March 24, 2021

    No clue from my side, unfortunately :( it should work from chip side...

    You could try reducing the Vdd / VddIO values.

    And you could also try writing the I2C_disable bit in the CTRL4_C (13h) register, that is a further insurance in disabling the I2C interface (could be useful in case ofin case of huge cross-talks).

    You can try asking to the online support for more help.

    -Eleon

    SChin.2AuthorAnswer
    Visitor II
    March 25, 2021

    Hello @Eleon BORLINI​ 

    found the root cause for it, MISO line is with high impedance , just need to place the resistance to avoid reflections on the line. In my case we have added 20ohms resistor is added.

    ST Employee
    March 25, 2021

    Glad to hear you solved your issue @SChin.2​ !

    -Eleon

    SChin.2Author
    Visitor II
    March 26, 2021

    Hi @Eleon BORLINI​ 

    Is their any calibration process that we need to perform on this sensor ?.

    As here we are seeing gyro reading even though it is stationary, When it is at stationary we are suppose to see zero values but we are seeing non zero values any clue ?

    reading (FS: +/- 500dps, ODR:104hz):

    X: 350mdps

    Y: -5285mdps

    Z: -4550mdps

    ST Employee
    March 26, 2021

    Hi @SChin.2​ ,

    please note that the G_TyOff parameter, i.e. the angular rate typical zero-rate level after soldering (datasheet p.20) has typical values in the range of ±10dps.

    Your results are actually in this range, so no issue.

    -Eleon

    SChin.2Author
    Visitor II
    March 26, 2021

    Can you please comment on the calibration part too !!