AnsweredAssumed Answered

Very fast I2C frequency: Possible errata on K82F

Question asked by Eduardo Mendez on Mar 27, 2018
Latest reply on Apr 4, 2018 by Eduardo Mendez

Hi

 

I have a MK82F design and I'm experimenting problems when trying to configure I2C baudrate at very high speed frequencies. I've no problem when configuring I2C frequency to until 400KHz. But when trying to configure the I2C frequency at for example 900KHz, the actual I2C frequency I get is 640KHz (measured by using an oscylloscope).

 

This difference is very big. I know that not all frequencies are possible to be implemented (check for example: I2C frequency - MKL33Z64VLH4 ), but this difference is really very big. 

 

I've been debugging code execution and the function I2C_MasterSetBaudRate sets the following configurations:

 

  • Mult:  0
  • ICR: 0xF (corresponds to SCL divider = 68)

 

Because my bus clock is 60M, the I2C frequency I should get is:

 

60M / 68 = 882352Hz = 882KHz 

 

Which it sounds reasonably. The problem is the actual frequency I get is 640KHz.

 

I've checked this problem also at 700KHz. I've also verified clocks configuration and everythink looks correct: at higher I2C frequencies, bigger errors. Checking the Reference Manual I should be able to arrive to until 60M / 20 Hz, what should be around 3MHz. Capabilities in the line shouldn't affect to this frequency, just the waveform.

 

Could you confirm this problem?

 

Thanks in advance

 

Eduardo

Outcomes