Hello,
We had a a bit of a hard time getting the right combination of inits and pin assignements to get the I2C port on the EK-LM4F232 board to work. But this code did the trick:
----------------------------------------
void InitI2C1()
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinConfigure(GPIO_PA6_I2C1SCL); //Setup Mux
GPIOPinConfigure(GPIO_PA7_I2C1SDA);
GPIOPinTypeI2C(GPIO_PORTA_BASE, GPIO_PIN_6 | GPIO_PIN_7); //Set up direction
//Reconfigure for correct operation
GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_6, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_OD);
I2CMasterInitExpClk(I2C1_MASTER_BASE, SysCtlClockGet(), false);
IntEnable(INT_I2C1);
I2CMasterSlaveAddrSet(I2C1_MASTER_BASE, SLAVE_ADDRESS, false);
I2CMasterIntEnableEx(I2C1_MASTER_BASE,I2C_MASTER_INT_DATA | I2C_MASTER_INT_TIMEOUT); }