Skip to main content
Associate II
January 31, 2024
Solved

LSM6DSV16X Register Reading and Writing Issues

  • January 31, 2024
  • 2 replies
  • 2435 views

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!

 

This topic has been closed for replies.
Best answer by Federica Bossi

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

 

2 replies

Federica Bossi
Federica BossiBest answer
Technical Moderator
February 1, 2024

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.
ZoeTakacsAuthor
Associate II
February 1, 2024

Thank you, that solved my problem!