summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-14 10:48:24 -0700
committerKeith Packard <keithp@keithp.com>2013-05-14 10:48:24 -0700
commite1c3fc8d2a1504b9801a710cbf79cfeb7daf4b66 (patch)
treec67c989465d1d0574f016bbaa5f72650b7861a18
parent8e47c9929318d81bbafe6bf2b2f0d8879291a0e0 (diff)
altos: Add 3 second delay to let mpu6000 come to life
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/drivers/ao_mpu6000.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c
index fc768cc9..38d29b8c 100644
--- a/src/drivers/ao_mpu6000.c
+++ b/src/drivers/ao_mpu6000.c
@@ -161,12 +161,15 @@ ao_mpu6000_setup(void)
if (ao_mpu6000_configured)
return;
+ ao_delay(AO_SEC_TO_TICKS(3));
+
/* Reset the whole chip */
ao_mpu6000_reg_write(MPU6000_PWR_MGMT_1,
(1 << MPU6000_PWR_MGMT_1_DEVICE_RESET));
/* Wait for it to reset. If we talk too quickly, it appears to get confused */
+ ao_delay(AO_SEC_TO_TICKS(3));
ao_delay(AO_MS_TO_TICKS(100));
/* Reset signal conditioning */