cancel
Showing results for 
Search instead for 
Did you mean: 

How to read WHO_AM_I register value read in LSM6DSOX?

Sprem.1
Associate III

I am trying to read the WHO_AM_I register in LSM6DSOX in that register value is (0Fh) and fixed value is (6Ch) but I am getting 0x00 I don't why can you help me regarding this

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

You should know how Start_SPI_Transaction is implemented, so please check the transmitted address and the SPI lines for correct data transmission.

All information on initialisation, how to define functions for read and write transactions and integrating extra bits can be found at the Github site mentioned above.

Good luck!

/Peter

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.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Welcome, @Sprem.1​, to the community!

Do you know e.g. our Standard C Drivers on Github, where you will find two functions (lsm6dsox_id_get, lsm6dsox_device_id_get) to read the WHO_AM_I register?

Are you able to read other register values?

Regards,

/Peter

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.
Sprem.1
Associate III

Thank you so much @Peter BENSCH for your reply

what we are trying to do is connecting with the texas microcontroller and lsm6dsox sensor in that for the initial step we are reading WHO_AM_I register

txBuffer[0] =0x0F | 0x80;//WHO_AM_I register address

txBuffer[1]=0x00;

Start_SPI_Transaction (txBuffer,2,rxBuffer,2);

output[0]=rxBuffer[1];

From this, in Rx buffer, we should get (0x6C) fixed value (datasheet) but we are getting 0x00 I don't why?

I also have another doubt to configure the lsm6dsox sensor we need to follow any configuration process? can you help me regarding this

Peter BENSCH
ST Employee

You should know how Start_SPI_Transaction is implemented, so please check the transmitted address and the SPI lines for correct data transmission.

All information on initialisation, how to define functions for read and write transactions and integrating extra bits can be found at the Github site mentioned above.

Good luck!

/Peter

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.
Sprem.1
Associate III

Finally, we got output from WHO_AM_I register it is connection issue

Peter Bensch, I have another doubt we are trying to read high-performance mode in lsm6dsox we have any procedure to access the register

we have tried according to the datasheet but we getting is 0 in the OUTX_L_A register can you help me regarding this issue

The original question has been answered. Therefore it makes sense to create a new thread for further problems.

Regards

/Peter

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.
Sprem.1
Associate III

Thank you so much peter