Skip to main content
KShen.1
Associate II
November 19, 2021
Question

Question about calculating i2c timing

  • November 19, 2021
  • 2 replies
  • 3440 views
  1. I use stm32373c_eval board and I try to acquire and send test data by i2c communication.
  2. The max speed of usb-i2c i use is 400k and board i2c clock frequency is 72M.
  3. I downloaded the I2C_Timing_Configuration_V1.0.1.xls from st website.
  4. I try to configure the tool, but the firmware does not work fine. I am here not quite sure if the parameter i fill is right or not especially the value of Rise time and Fall time.
  5. The attach pic is the screenshot of the i2c tool i configure. Please let me know if my configuration is right or not.

Thanks!

0693W00000GXoyQQAT.png

This topic has been closed for replies.

2 replies

Pavel A.
Super User
November 20, 2021

Please see this thread. Few last replies from Jan W.

DOCon.1
Senior
November 21, 2021

0693W00000GYK6pQAH.pngI2C timing is a bit opaque. I recommend extrapolating from the RM timing table examples. The RM goes into lots of details, and ultimately suggests using Cube. Of note, the example tables are for the same set of APB freqs, on a range of STM32 devices. So, having a 24Mhz etc clock makes sense for some variatns, but it uses the same table for H7, which may have a 200Mhz APB clock!

Pavel A.
Super User
November 21, 2021

Even on H7 running at 500 MHz the I2C source clock can come from multiple sources, with divisors. You can easily find one close to 48 MHz.

0693W00000GYKliQAH.png