This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: What is missing in my I2C init?

Part Number: TM4C1294NCPDT


I am using TM4C1294's I2C module 2, I picked some samples online, but it drops dead at I2CMasterInitExpClk, can anyone give me pointer or a working example? Thanks!

_______________________________

ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);


SysCtlDelay(100);


SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C2);
SysCtlPeripheralReset(SYSCTL_PERIPH_I2C2);

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
GPIOPinConfigure(GPIO_PN5_I2C2SCL);
GPIOPinConfigure(GPIO_PN4_I2C2SDA);

GPIOPinTypeI2C(GPIO_PORTN_BASE,GPIO_PIN_4); // Configures SDA
GPIOPinTypeI2CSCL(GPIO_PORTN_BASE, GPIO_PIN_5); // Configures SCL

I2CMasterInitExpClk(I2C2_BASE, SysCtlClockGet(), false);