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.

TMS320F28377D: Actual IIC peripheral clock frequency after configuration

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hi all,

I am a little confused about the clock configuration in IIC example project.

The project's location: C:\ti\controlSUITE\device_support\F2837xD\v150\F2837xD_examples_Cpu1\i2c_eeprom

The clock related configuration is:

InitSysPll(XTAL_OSC,IMULT_20,FMULT_1,PLLCLK_BY_2);   //PLLSYSCLK = 20MHz(XTAL_OSC) * 20 (IMULT) * 1 (FMULT) /  2 (PLLCLK_BY_2)

I2caRegs.I2CPSC.all = 6;      // Prescaler - need 7-12 Mhz on module clk

In this example, I calculate the clock supply frequency like this:

PERx.SYSCLK = 20*20*1/2/7 = 28.57M

which is different from what is mentioned in the comment "7~12M"

Am I do the wrong calculation?

Thanks!

  • Hi Sheldon,

    Your calculation looks right, I think the prescaler in the example is actually wrong.

    This seems to have been fixed in a C2000Ware revision, but not ControlSuite. I'd suggest installing the latest C2000ware and using it going forward, at least for newer devices.

    Please use a prescaler of 16 as shown below:

    I2caRegs.I2CPSC.all = 16;         // Prescaler - need 7-12 Mhz on module clk

    I'm sorry for this inconvenience and I'll work on reporting the issue present in ControlSuite.

    Best,

    Kevin