I am using a TM4C123 family microcontroller as the master of a PMBus. While trying to debug an issue that is causing a bad CRC to occur on some reads, faster clock speed seems to operate better with the particular power module I am using, so I wanted to increase my I2C clock speed from 100KHz to 400KHz. At 100KHz the clock and data look fine, besides the occasional CRC error. When trying to move to 400KHz though, the I2C bus clock seem to be more like 268KHz or so. I would think that the operation of changing the I2C data rate would be as simple as changing:
ROM_I2CMasterInitExpClk (I2C4_BASE, ROM_SysCtlClockGet (), false);
to
ROM_I2CMasterInitExpClk (I2C4_BASE, ROM_SysCtlClockGet (), true);
Now I have known the SysCtlClockGet() function to be a bit finicky in the past, so I tried an explicit value of 50,000,000 in the function's place. Still see a clock around 260ish KHz. My system clock is set up for a 50MHz clock, I believe:
//400MHz/(2*4) = 50MHz
ROM_SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_OSC_INT);
Any suggestions?