System Setup
- CCS 4.2
- TI5502
I am using the following code to configure the I2C registers, but at least two of the registers (I2CCLKH, I2CPSC) do not get updated:
I2C_Config configLCM = { 0,
/* I2COAR own address /
0, /* I2CIER interrupt enable */
0xEFFF, /* I2CSTR status register, don't mask Bus Busy, want to check on init */
22, /* I2CCLKL low clock divisor */
21, /* I2CCLKH high clock divisor */
0, /* I2CCNT count register, don't care at this time */
ADC_ADDR_LCM, /* I2CSAR slave address register */
0x4420, /* I2CMDR mode (emu freemode,Master, EnableI2C) */
0, /* I2CISRC (has a TESTMODE bit which should be 0) */
14 /* I2CPSC prescaler */
};
I2C_config(configLCM);
i2cCLKH = I2C_RGET(I2CCLKH); Both these registers are set to zero verses 21 and 14 respectively. When I ran this same code with my CCS 2.21 platform, I2C_config() correctly configures all the I2C registers.
i2cPSC = I2C_RGET(I2CPSC);