Giter Club home page Giter Club logo

Comments (3)

Padifu03 avatar Padifu03 commented on August 17, 2024

Hi echoming,
I have been working on LSM6DS3TR-C with the uC STM32L431RCT6. I had the same bug as you but, since a time reading the datasheet and comparing registers with the driver´s ones, I fixed it.
The bug is related to the slave address(SAD) and the SA0 pin, in my case the SA0 pin is connected to the supply voltage so my SAD is D6h to write and D7h to read from slave.
In the driver it appears that D5h is the write register from slave which is wrong and that made that the code doesn´t work.

Additional context

File: lsm6ds3tr-c_reg.h

Code of driver:
/** I2C Device Address 8 bit format if SA0=0 -> D5 if SA0=1 -> D7 **/
#define LSM6DS3TR_C_I2C_ADD_L 0xD5U
#define LSM6DS3TR_C_I2C_ADD_H 0xD7U

Code of driver changed:
// I2C Device Address 8 bit format if SA0=1 -> D6 (W) if SA0=1 -> D7 (R)
#define LSM6DS3TR_C_I2C_ADD_H_W 0xD6U
#define LSM6DS3TR_C_I2C_ADD_H_R 0xD7U
// I2C Device Address 8 bit format if SA0=0 -> D4 (W) if SA0=0 -> D5 (R)
#define LSM6DS3TR_C_I2C_ADD_L_W 0xD4U
#define LSM6DS3TR_C_I2C_ADD_L_R 0xD5U

from stmems_standard_c_drivers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.