Dear TI engineers:
I connected CC3200 with MPU6050 with I2C. MPU6050 is attached with another slave device ak8975. ak8975 could be selected as slave by enable the bypass register in MPU6050.
The problem i encountered is that:
i once successfully connect to MPU6050, as shown in the following graph: (MPU6050 slave address is 0x68, WHO_AM_I register address is 0x75
However, later, i dont know what i had done, the communication didnt work anymore. And the error type is I2C_MASTER_ERR_ARB_LOST. the wrong communication is shown below:
there are 2 things i could remember that i did might cause this problem:
1. i tried change the PIN mode configuration from PIN_MODE_5 to PIN_MODE_1, because in the "i2c demo" it used PIN_MODE_1 instead of PIN_MODE_5 which is generated by pinmux tool.
// Configure PIN_03 for I2C0 I2C_SCL
PinTypeI2C(PIN_03, PIN_MODE_5);
// Configure PIN_04 for I2C0 I2C_SDA
PinTypeI2C(PIN_04, PIN_MODE_5);
After i realized that PIN_MODE_1 doesnt work, i changed it back to PIN_MODE_5 immediately.
2. i tried connect the AK8975 by enable the bypass of MPU6050.
I really could not find the cause of problem and solution to it. how does problem related to arbitration lost??
Following are my initialization codes:
void MPU6050_I2C_Init(void){
// Configure PIN_03 for I2C0 I2C_SCL
PinTypeI2C(PIN_03, PIN_MODE_5);
// Configure PIN_04 for I2C0 I2C_SDA
PinTypeI2C(PIN_04, PIN_MODE_5);
MAP_PRCMPeripheralClkEnable(PRCM_I2CA0, PRCM_RUN_MODE_CLK);
MAP_PRCMPeripheralReset(PRCM_I2CA0);
MAP_I2CMasterInitExpClk(I2CA0_BASE,SYS_CLK,false); // set up the transfer to standard mode
MAP_I2CMasterEnable(I2CA0_BASE);
MAP_I2CMasterIntEnable(I2CA0_BASE);
}
Thanks