Tool/software: Code Composer Studio
Hello.
Iam trying to interface MPU-6050 with my F28379D Launchpad via I2C. Iam unable to generate the clock on my SCL pin. I intend to use GPIO 104 and GPIO 105 for interfacing.
void Init_GPIO(void)
{
InitGpio();
EALLOW;
GpioCtrlRegs.GPBGMUX1.bit.GPIO104 = 0;
GpioCtrlRegs.GPBGMUX1.bit.GPIO105 = 0;
GpioCtrlRegs.GPBMUX1.bit.GPIO104 = 1;
GpioCtrlRegs.GPBMUX1.bit.GPIO105 = 1;
GpioCtrlRegs.GPDPUD.bit.GPIO104 = 0;
GpioCtrlRegs.GPDPUD.bit.GPIO105 = 0;
EDIS;
}
void I2CA_Init(void)
{
I2caRegs.I2CSAR.all = 0x0068;
I2caRegs.I2CPSC.all = 15; //(SYSCLK = 160MHz)
I2caRegs.I2CCLKL = 10;
I2caRegs.I2CCLKH = 5; // (400 kbps-FAST MODE)
I2caRegs.I2CIER.all = 0x24;
I2caRegs.I2CMDR.all = 0x0020;
I2caRegs.I2CFFTX.all = 0x6000;
I2caRegs.I2CFFRX.all = 0x2040;
return;
}
Iam only able to see my SCLA pin getting high when checked through an oscilloscope(because of internal pullup)
Please Help
Thanks and Regards,