cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSV16X Register Reading and Writing Issues

ZoeTakacs
Associate II

Hi all, 

I am implementing the following GitHub code to initiate sensor fusion in the LSM6DSV16X sensor chip. The board will communicate via UART however there seems to be an issue reading and writing to registers via the HAL driver functions provided. I am using the NUCLEO-F411RE as recommended in the code with the ISK4A1 expansion board. 

If anyone knows what might be wrong with the HAL memory read and memory write functions please let me know. 

Could it be an incorrect I2C address being called? Or is there something wrong with the combination of boards I am using? 

GitHub Link: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/README.md

The attached files are the C code files which I am trying to use. 

Thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @ZoeTakacs ,

Those examples were designed to have the sensor mounted on the DIL24, and therefore use the I2C address with SA0 set to '0'. To make them work, you have to change the address in all routines like this:

LSM6DSV16X_I2C_ADD_L --> LSM6DSV16X_I2C_ADD_H

 

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

2 REPLIES 2
Federica Bossi
ST Employee

Hi @ZoeTakacs ,

Those examples were designed to have the sensor mounted on the DIL24, and therefore use the I2C address with SA0 set to '0'. To make them work, you have to change the address in all routines like this:

LSM6DSV16X_I2C_ADD_L --> LSM6DSV16X_I2C_ADD_H

 

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

Thank you, that solved my problem!