Hi,
I am reading multiple TMP275 devices over I2C on an MSP430F6736. I read 2 consecutive bytes for the temperature reading. I have been successful with the default 32xDCO SMCLK + MCLK settings.
But, as soon as I change the MCLK to 12MHz (11.993088MHz to be precise), and the SMCLK to 749,568Hz (dividing by 16), I2C reception goes bonkers!! The first byte is received alright but the second read somehow manages to flood the MSP with RXIFG interrupts and fills my receive array (and bytes beyond it) with 0xFFs!
UCS_getSMCLK() and UCS_getMCLK() confirm the frequency that I am able to get. And, I have increased the core voltage using:
PMM_setVCore(PMM_CORE_LEVEL_2);
This is how I configure the I2C interface:
EUSCI_B_I2C_initMasterParam param = { 0 }; param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK; param.i2cClk = UCS_getSMCLK(); param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_100KBPS; param.byteCounterThreshold = 0; param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
My scope confirms that the frequency generated on the SCL is about 100kHz.
Any pointers would be highly appreciated as I have possibly exhausted all my powers of reasoning this one out!
Any example code that reads multiple bytes over I2C using interrupts on eUSCI would also be great if they are using higher frequencies for the MCLK/SMCLK.