cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS1 SPI protocol

AR1
Associate II

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

3 REPLIES 3
niccolò
ST Employee

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ò

AR1
Associate II

I will try to check the signals through the oscilloscope.

Thank you.

Angela

niccolò
ST Employee

Hi Angela @AR1​ ,

you're welcome =)

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

Niccolò