Skip to main content
Graduate
January 31, 2024
Solved

LSM6DSV16X Register Reading and Writing Issues

  • January 31, 2024
  • 2 replies
  • 2434 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

    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

     

    ZoeTakacsAuthor
    Graduate
    February 1, 2024

    Thank you, that solved my problem!