Comments (3)
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)
- i3g4250d: incorrect multiple byte reading in i3g4250d_angular_rate_raw_get() HOT 1
- lps22ch : pressure value is only zero HOT 1
- lsm6dso
- lsm6dso: Example perhaps uses wrong function HOT 2
- LSM6DSO: Self test code working? Ever tried out? HOT 1
- More typos -> LSM6DSO HOT 2
- "ISM330DLC" Not able to get VDD and VDDOUT 1.8 voltage HOT 1
- ISM330DLC
- IIS3DWB code library
- Lsm6dsox devide_id_get
- l3gd20h: self test function
- Replace sprintf with snprintf
- Is SFLP quaternion supporteed for ODR>30Hz? HOT 1
- Losing sign of quaternion
- Part Number lsm6dsm issue HOT 2
- "threshold" is misspelled as "treshold" in many drivers HOT 2
- Weird "5Hz2" ODR constant in several drivers HOT 2
- lis25ba no example
- wrong array size in iis3dwb fifo example HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stmems_standard_c_drivers.