AnsweredAssumed Answered

STM32CubeMX I2C Timing Register Calc Wrong?

Question asked by Robert Ritchey on Mar 30, 2018

I was looking at the timing value that STM32CubeMX calculated for the I2C timing register in my STM32F486.  I have the I2C1 clock in at 80MHz.  I checked the data sheet and did not see a maximum value for the I2CCLK and CubeMX is not complaining so I figured it was OK to leave this as is.  When I checked the value for I2C_TIMINGR that CubeMX calculated it seems to be off somewhat.  The value for SCLH is 0x9C and the value for SCLL is EC.  If I back these out to actual time SCLH is 3.925usec and SCLL is 5.925usec.  The I2C clock turns out to be 100502.5Hz, just over the maximum 100KHz it should be.  It seems to me that these values really should be 0x9E and 0xEE.  Am I missing something here?  Thanks.  

Outcomes