cancel
Showing results for 
Search instead for 
Did you mean: 

How to change LSM6DSOX SPI MODE?

DLim.16
Associate II

Hi,

The datasheet says the device is capable of SPI MODE 0 and 3, the default mode is 3. How does one change it to SPI MODE 0? Is it a hardware or software change?

Thanks.

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @DLim.16​ , the change between the two SPI modes depends on the Master SPI (for example, an STM32 MCU), because it is basically related to the CS, CLK and MOSI reciprocal phases that are managed by the master, and the slave device will respond accordingly to the instruction received. Regards

Hi Eleon,

Thanks for the answer! I have another quick question. What changes do I need to make in the software and hardware to make sure the device is in SPI mode? I can read it in I2c, but never in SPI mode. I verified the SPI clock pulses and that the chip select was low during a spi transaction, and the serial output data was also correct, but I am not reading the correct data back. I am using STEVAL-MKI197v1 by the way.

Thanks.