Skip to main content
Sprem.1
Associate II
July 27, 2021
Solved

How to read WHO_AM_I register value read in LSM6DSOX?

  • July 27, 2021
  • 5 replies
  • 3032 views

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

This topic has been closed for replies.
Best answer by Peter BENSCH

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

5 replies

Peter BENSCH
ST Technical Moderator
July 27, 2021

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
Sprem.1Author
Associate II
July 27, 2021

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
Peter BENSCHBest answer
ST Technical Moderator
July 27, 2021

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
Sprem.1Author
Associate II
August 3, 2021

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

Peter BENSCH
ST Technical Moderator
August 4, 2021

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
Sprem.1Author
Associate II
August 9, 2021

Thank you so much peter