mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-07 16:33:28 +00:00
When testing the bmi160 I've come across an issue where the readings didn't make sense to me. The issue comes from reading the BMI160_SAMPLE_BURST_READ_ADDR which is 0x0C assuming both accelerometer and gyroscope. At this point we would normally read 12 bytes (2 bytes per sample * 3 axes * 2 sensors). This reading takes place in bmi160_sample_fetch and begins writing to data->sample.raw Without this change, the first byte written is actually to the dummy byte which effectively gets tossed. The issue is that this is the GYR_X<7:0>(LSB) according to the BMI160 data sheet. When we later call either bmi160_gyr_channel_get or bmi160_acc_channel_get we're looking at sample.gyr and sample.acc (which is effectively shiften by 1 byte). This change gets rid of the dummy byte which re-alignes gyr with the start of the raw buffer. Signed-off-by: Yuval Peress <peress@chromium.org> |
||
---|---|---|
.. | ||
bluetooth | ||
canbus | ||
console | ||
cpp | ||
debug | ||
dfu | ||
disk | ||
emul | ||
fb | ||
fs | ||
jwt | ||
logging | ||
lorawan | ||
mgmt | ||
net | ||
power | ||
random | ||
settings | ||
shell | ||
stats | ||
storage | ||
testsuite | ||
timing | ||
tracing | ||
usb | ||
CMakeLists.txt | ||
Kconfig |