cancel
Showing results for 
Search instead for 
Did you mean: 

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

LUKE1
Associate II
 
4 REPLIES 4
LUKE1
Associate II


_legacyfs_online_stmicro_images_0693W00000bi96xQAA.png the ID is not OK

Federica Bossi
ST Employee

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
Associate II

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
Associate II

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