Skip to main content
Visitor II
October 17, 2019
Question

How to change LSM6DSOX SPI MODE?

  • October 17, 2019
  • 1 reply
  • 777 views

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.

    This topic has been closed for replies.

    1 reply

    ST Employee
    October 18, 2019

    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

    DLim.16Author
    Visitor II
    October 18, 2019

    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.