cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSO SPI communication problem

gabriel.arnautu
Associate II

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

13 REPLIES 13
gabriel.arnautu
Associate II

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

gabriel.arnautu
Associate II

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

Eleon BORLINI
ST Employee

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?

gabriel.arnautu
Associate II

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.

S.Ma
Principal

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

gabriel.arnautu
Associate II

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

Eleon BORLINI
ST Employee

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

gabriel.arnautu
Associate II

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

Eleon BORLINI
ST Employee

​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