summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-07-13 15:36:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-14 01:03:45 -0700
commit59abb386c85753f568f246024902c79376958080 (patch)
tree90bce70c32082af08d6c2492239a55fe6b79be6a
parent2367e59a16e7426c3304aa6bc61adfc8fb590324 (diff)
downloadchrome-ec-59abb386c85753f568f246024902c79376958080.tar.gz
nocturne: Set BMI160 speed to 400kHZ
When running at just 100kHz, the EC has difficulty to read samples in time. It can take up to read the FIFO 5 times back to back to read the samples: [484.946134 14 bytes in FIFO ] [484.949848 BMI160 ACC : int scan 2 times] [484.957095 14 bytes in FIFO ] [484.961614 14 bytes in FIFO ] [484.966271 14 bytes in FIFO ] [484.970900 14 bytes in FIFO ] [484.974541 BMI160 ACC : int scan 5 times] When 400kHz is enable it happens rarely. [Only when higher priority threads are running in thight loop]: [3341.194286 BMI160 GYRO ODR: 200000 - roundup 1 from config 0 [AP 200000]] [3341.201762 HC 0x67 err 9] [3341.202395 HC 0x67 err 9] [3341.203439 HC 0x67 err 9] [3341.204378 HC 0x67 err 9] [[3341.205056 HC 0x67 err 9] [3341.205654 HC 0x67 err 9] 3341.204881 14 bytes in FIFO ] [3341.206493 HC 0x67 err 9] [3341.209807 14 bytes in FIFO ] [3341.212296 BMI160 ACC : int scan 3 times] [3346.238588 BMI160 ACC ODR: 10000 - roundup 1 from config 1 [AP 0]] BUG=b:78539498,b:110143516 BRANCH=none TEST=Run CtsHardwareTestCases on Nocturne less tests fails. Change-Id: I07d067d04f6db3cfaf23c47baf6cd6942e46c159 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1137238 Commit-Ready: Alexandru M Stan <amstan@chromium.org> Tested-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
-rw-r--r--board/nocturne/board.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index d140e58c6c..f3aafed99c 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -126,9 +126,8 @@ const struct i2c_port_t i2c_ports[] = {
GPIO_EC_I2C0_POWER_SDA
},
- /* TODO(aaboagye): Restore 1MHz bus speed for after eval. */
{
- "als_gyro", I2C_PORT_ALS_GYRO, 100, GPIO_EC_I2C5_ALS_GYRO_SCL,
+ "als_gyro", I2C_PORT_ALS_GYRO, 400, GPIO_EC_I2C5_ALS_GYRO_SCL,
GPIO_EC_I2C5_ALS_GYRO_SDA
},