Other Parts Discussed in Thread: LM3S2965, TM4C123GH6PZ, TM4C123GH6PGE
Hi
I have a working Project using Stellaris, we have written the code the previous Year. But now we are porting to TIVA controller and I am not able to make I2C work
Previous Controller : LM3S2965
Present Controller : TM4C123GH6PZ
This is the code i am trying :
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C5); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG); I2CMasterIntEnable(I2C5_BASE); GPIOPinTypeI2CSCL(I2C5_BASE, GPIO_PIN_6); GPIOPinTypeI2C(GPIO_PORTG_BASE, GPIO_PIN_7); GPIOPadConfigSet(GPIO_PORTG_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); I2CMasterInitExpClk(I2C5_BASE, SysCtlClockGet(), false); IntEnable(INT_I2C5);
I noticed many codes using these lines:
ROM_GPIOPinConfigure(GPIO_PB2_I2C0SCL); ROM_GPIOPinConfigure(GPIO_PB3_I2C0SDA);
But i get error that the GPIO_PB2_I2C0SCL (GPIO_PG6_I2C5SCL in my case) does not exist.
Also I there is no 'GPIO_PIN_TYPE_OD_WPU' available, instead there is 'GPIO_PIN_TYPE_OD' or 'GPIO_PIN_TYPE_STD_WPU'
i have been trying from 2 days but i couldnt make it to work.
Please help me.