Skip to main content
Visitor II
January 24, 2019
Question

LSM6DSO SPI communication problem

  • January 24, 2019
  • 13 replies
  • 3446 views

Good morning,

I am trying to read the WHO_AM_I register from LSM6DSO, but it doesn't respond as needed. I will attach a picture from signal analyzer (D0 is CS, D1 is CLK, D2 is MISO, D3 is MOSI). It looks like its respond is 0x50 instead of 0x6C. What should I change?

I tried with a MAX32630 and it was working (8 bits transfer mode).

When I try with RS14100 (16 bits mode) it responds with 0x50 instead of 6C.

Gabriel

    This topic has been closed for replies.

    13 replies

    Visitor II
    January 24, 2019

    It looks like if I am using 1.8V it returns 0x6C which is correct. Does that makes any sense?

    Visitor II
    January 24, 2019

    I finally found the problem. I was using 1.8V for communication, but my VDDIO was connected to 3.3V

    ST Employee
    January 24, 2019

    Hi Gabriel, yes, it's recommended that VDD >= VDD_IO, mainly for having well defined VH and VL for the correct SPI data interpretation. Btw do you always use SPI on 8bit, right?

    Visitor II
    January 24, 2019

    Hi, now I am using SPI on 16 bits and I am trying to make it working like this. I don't know why, but my ARM doesn't want to request the data from the sensor on 8bit SPI.

    Visitor II
    January 24, 2019

    MEMs may boot in SPI 3 wire mode (MOSI short with MISO). Write the control register to switch to 4 wire, then read back in 4 wire mode SPI. Check teh spec

    Visitor II
    January 25, 2019

    It is 4 wires as I was using it like that before as well.

    ST Employee
    January 25, 2019

    ​Hi kic, if flashed 4-wires (SIM bit in CTRL3_C reg default 0), the sensor always starts 4-wires.

    Visitor II
    January 25, 2019

    Hi @Eleon BORLINI​ , is there any table with the errors that you can get from the sensor? Now I am getting again 0x50 instead of 0x6C when I read the WHO_AM_I register

    ST Employee
    January 25, 2019

    ​hi Gabriel, did you follow all the Mode1 electrical connection suggestions?

    And is this error still related only to RS14100 device? Could you set 8bit communication instead of 16bit on your master?

    0690X000006DEjMQAW.png

    Visitor II
    January 25, 2019

    Hi Eleon, as far as I can see, the problem occurs when I am connecting the same voltage on VDDIO as for VDD, but it shouldn't happen this, right? Now I am using 3.3V for VDD and 1.8V for IO and it looks like is working.

    I don't know yet, but I get no answer from sensor if I set the 8bit on master. I raised a ticket to them as well.