Skip to main content
Visitor II
May 11, 2021
Question

LSM9DS1 SPI protocol

  • May 11, 2021
  • 3 replies
  • 908 views

Hello,

I've devoleped a board with LSM9DS1 and STM32F446, that have to comunicate with SPI 4 wire. I've seen the connection on the datasheet of the LSM9DS1, but I can't read data.

I tried to read whoamI (0x0F) register, but the answer is always 0.

I have used LSM9DS1 ST library on github and I've tried also the example lsm9ds1_read_data_polling.

Can sameone help me?

Thank you,

Angela

    This topic has been closed for replies.

    3 replies

    ST Employee
    May 12, 2021

    Hi Angela @AR1​ ,

    are you able to check the signals through an oscilloscope?

    the is usually the best way to debug these problem, but if you do not have it, we can try something else.

    for example, the problem could lie in the schematic, maybe some missing connections.

    can you share it?

    another guess would be in SPI init function in the firmware.

    did you check if the return value is good?

    Niccolò

    AR1Author
    Visitor II
    May 12, 2021

    I will try to check the signals through the oscilloscope.

    Thank you.

    Angela

    ST Employee
    May 13, 2021

    Hi Angela @AR1​ ,

    you're welcome =)

    feel free to share screens from the oscilloscope if you need more help

    Niccolò