Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong register configuration (CTRL8_XL) #13

Open
leo-oel opened this issue Mar 29, 2020 · 1 comment
Open

wrong register configuration (CTRL8_XL) #13

leo-oel opened this issue Mar 29, 2020 · 1 comment
Labels
type: imperfection Perceived defect in any part of project

Comments

@leo-oel
Copy link

leo-oel commented Mar 29, 2020

LSM6DS3.cpp sets 0x09 to LSM6DS3_CTRL8_XL register while the LSM6DS3 datasheet says the
bit3 shoud be zero for the correct operation.
I suppose the value should be 0x05.

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Mar 29, 2020
@kaiiorg
Copy link

kaiiorg commented Jun 18, 2020

Working on my own branch to try to implement FIFO usage and decided to try to address this issue while I was at it. I was running into issues where setting LSM6DS3_CTRL8_XL to 0x05 instead of the existing 0x09; it was changing the accelerometer data you would read from the device.

If I'm interpreting the documentation and the block diagram correctly, setting LSM6DS3_CTRL8_XL to 0x05 sets LPF2_XL_EN to 0, HP_SLOPE_XL_EN to 1, and HPCF_XL[1:0] to 00, and thus enables the slope filter. The values you'd read would be (near) zero until there was a change.

Setting LSM6DS3_CTRL8_XL to 0x09, an invalid bit was set to 1 and no filters were enabled, and the data you'd get would be whatever acceleration the device was measuring at the time; movement of the device and/or gravity. I guess we could have also been tempting fate at undefined behavior since, as stated before, the documentation says that bit should remain 0.

Therefore, we should remove the lines changing the register altogether as the default value for LSM6DS3_CTRL8_XL on power up is 0x00.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants