MPU6000 keeps transitioning to sleep mode

By andrew_stewart , 7 June 2012

Hi,

I've got some strange problem with the MPU6k in SPI-Mode. The device always transitions into sleep mode.

After my Init routine, a PWR_MGMT_1 register read shows that it has sucessfully cleared. Reading it again after a while, shows that the device transitions back to sleep mode...

Here is what I do during init:

void MPU6000_Init(void)
{
CyDelay(100); // Allow MPU to power up

MPU6000_SetClkSrc(MPUCONF_CLKSEL_INT8MHZ); // Wake up MPU
MPU6000_Reset(); // Software Reset MPU
MPU6000_SetClkSrc(MPUCONF_CLKSEL_INT8MHZ); // Wake up MPU (0x00)

MPU6000_DisableI2C(); // Disable I2C, see Datasheet
MPU6000_WriteReg(MPUREG_AUX_VDDIO,0u);


MPU6000_SmplRtDiv(0u);
MPU6000_Config(MPUCONF_EXT_SYNC_SET_DSLB, MPUCONF_DLPF_CFG_98HZ);
MPU6000_GyroConfig(MPUCONF_FS_1000DPS);
MPU6000_AccelConfig(MPUCONF_FS_8G, MPUCONF_ACCEL_HPF_RST);

MPU6000_IntEnable(MPUCONF_DATA_RDY_EN);
MPU6000_IntPinCfg(MPUCONF_LATCH_INT_EN);
}


A complete dump of all registers also shows that writes to the GyroConfig, AccConfig and Config Registers are not working... but IntEnable and IntPinCfg -register writes do work.

I'm setting the SPI Clk to 500kHz during Init, and I'm also reading/writing the config registers at 500kHz all the time.

Currently I do not really understand what's the problem. I've also double checked my schematics against the datasheet - everything fine so far.

phpbb Topic ID
14433