-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Sensor BMI160: set of undersampling mode is not working #32774
Labels
area: Sensors
Sensors
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Comments
@vinceWii4 I created a pull request with the changes you suggested. The fix makes sense to me. 😃 |
carlescufi
pushed a commit
that referenced
this issue
Mar 9, 2021
Fix #32774 Bit position BIT(7) is 1000 0000 in binary which is actually the bit positon 128. BIT(7) can be used as a mask, but we need to define the position specifically as the integer 7. Signed-off-by: Guðni Már Gilbert <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Sensors
Sensors
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Problem description
In low power mode, the accelerometer current consumption is to high. After investigation I discovered that the undersampling mode wasn't corretly set in BMI160_REG_ACC_CONF.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
BMI160_REG_ACC_CONF: bit 7 of new_val should be enabled.
Impact
High current consumption in accelerometer low power mode
Solution
bmi160_pmu_set calls bmi160_reg_field_update() with a wrong pos parameter (shift of 128 instead of 7).
The text was updated successfully, but these errors were encountered: