Skip to main content
LUKE1
Associate
April 15, 2023
Question

for the LIS2DTW12, I have use SPI communication, How can I get the LIS2DTW12 ID, do we need send which is command? Please tell me,thanks

  • April 15, 2023
  • 4 replies
  • 1184 views

..

    This topic has been closed for replies.

    4 replies

    LUKE1
    LUKE1Author
    Associate
    April 15, 2023


    _legacyfs_online_stmicro_images_0693W00000bi96xQAA.png the ID is not OK

    Federica Bossi
    Technical Moderator
    April 18, 2023

    Ciao @LUKE​ ,

    How are you implementing the read protocol of SPI?

    In order to read a register in SPI mode you need to follow this sequence:


    _legacyfs_online_stmicro_images_0693W00000biJbqQAE.pngIf my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster!

    In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
    LUKE1
    LUKE1Author
    Associate
    April 19, 2023

    when I use I2C interface , send :address0x19,subaddr,0x0f ,get the read value: 0x44, it is ok for the result. but use the SPI, I send ,read the value:FF FF 80 00 00 00 00 00 81 B1 80 00 00

    LUKE1
    LUKE1Author
    Associate
    April 19, 2023

    Can you share me one SPI example, I am use Arduino to development, thanks ​