Skip to content

Commit 6dff8dc

Browse files
ymleung314kartben
authored andcommitted
drivers: icm42688: fix accel and gyro frequency in period calculation
When calculating accel and gyro period for 12.5Hz, the frequency value is incorrect. Updated to correct value. Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
1 parent 39923e3 commit 6dff8dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sensor/tdk/icm42688/icm42688_decoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static uint32_t accel_period_ns[] = {
290290
[ICM42688_DT_ACCEL_ODR_1_5625] = UINT32_C(10000000000000) / 15625,
291291
[ICM42688_DT_ACCEL_ODR_3_125] = UINT32_C(10000000000000) / 31250,
292292
[ICM42688_DT_ACCEL_ODR_6_25] = UINT32_C(10000000000000) / 62500,
293-
[ICM42688_DT_ACCEL_ODR_12_5] = UINT32_C(10000000000000) / 12500,
293+
[ICM42688_DT_ACCEL_ODR_12_5] = UINT32_C(10000000000000) / 125000,
294294
[ICM42688_DT_ACCEL_ODR_25] = UINT32_C(1000000000) / 25,
295295
[ICM42688_DT_ACCEL_ODR_50] = UINT32_C(1000000000) / 50,
296296
[ICM42688_DT_ACCEL_ODR_100] = UINT32_C(1000000000) / 100,
@@ -305,7 +305,7 @@ static uint32_t accel_period_ns[] = {
305305
};
306306

307307
static uint32_t gyro_period_ns[] = {
308-
[ICM42688_DT_GYRO_ODR_12_5] = UINT32_C(10000000000000) / 12500,
308+
[ICM42688_DT_GYRO_ODR_12_5] = UINT32_C(10000000000000) / 125000,
309309
[ICM42688_DT_GYRO_ODR_25] = UINT32_C(1000000000) / 25,
310310
[ICM42688_DT_GYRO_ODR_50] = UINT32_C(1000000000) / 50,
311311
[ICM42688_DT_GYRO_ODR_100] = UINT32_C(1000000000) / 100,

0 commit comments

Comments
 (0)