i ma trying to run I2C on kea 128 development board. the module which i am testing is I2C0 and the slave device being addressed is MPU IMU 9DOF.
I have done the mandatory setting required for configuring the i2c bus ,like the pin selection, clock rate and all,but i am not able to see anything on DSO of SDA or SCL pin. No clock generation is being done when i am doing some transaction on i2c bus.
I am using the I2C driver for KEA which have the necessary function for starting the I2C and configuring it for talking to a slave device.
I2C_ConfigType i2c_test; //object to I2C config struct in i2c.h
/***I2C (100Khz) Configuration for Current sensor****/
SIM_PINSEL0 &= ~SIM_PINSEL_I2C0PS_MASK; //map i2c0 pins on PTA3,SCL and PTA2,SDA
i2c_test.u16F = 0x1E; //I2C baud rate = I2C module clock speed (Hz)/(mul × SCL divider) = 20Mhz/(1x192)
i2c_test.u16OwnA1 = 0x68; //slave address
i2c_test.sSetting.bI2CEn = 0x01;
I2C_WriteOneByte(I2C0,0x75); //read WHO_AM_I reg of IMU slave
I have also attached the I2C drivers for ready reference>>>>>
when i run this code, nothing comes in uart port and led also doesn't blink. But if I disable all the I2C related functions, code runs perfect.Where am I going wrong.?????
Original Attachment has been moved to: iic.7z.zip