Skip to main content
Associate III
August 16, 2024
Question

cubeMX 6.12.0 and below generates wrong I2C timings

  • August 16, 2024
  • 1 reply
  • 941 views

Hi

I have problems with the I2C frequency when I'm generating code with CubeMX 6.12.0 for the STM32U5A9. The timing register from the I2C3 is generated wrong, which leads to a frequency around 350kHz instead of selected 400kHz in FastMode operation.

The tool generates 0x0010061A and regarding the datasheet example (see printscreens) it should generate something like 0x10320309.

Can you fix that in the next version?

Thanks in advance

nobody_1-1723798827523.png

nobody_2-1723798855597.png

 


nobody

nobody_0-1723797837248.png

 

1 reply

TDK
Super User
August 16, 2024

Can you attach your IOC?

Note that I2C timings are never going to be exact.

"If you feel a post has answered your question, please click ""Accept as Solution""."
nobodyAuthor
Associate III
August 19, 2024

Hi

Thanks for the answer. 

What means exact, I would expect that is in the range of 400kHz and not more then 10% inexact.

I attached you the requested .ioc file.

Thanks in advance