I2C_frequency configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 4:06 AM
Hi,
I would like to configure the I2C frequency based on the input clock frequency. Is there a specific formula to calculate the I2C timing values? Also, I would like to know whether this formula is applicable to all STM32 microcontrollers, or if it varies depending on the MCU series.
Could you please provide clarification on this, along with example code for configuring the I2C frequency using the appropriate register settings and formulas?
Thanks,
Sainath
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 5:10 AM
The official source is the I2C chapter in the reference manual of your MCU. It comes with tables for some common settings, otherwise you have to go through the text and formulae.
You may find it easier using STM32CubeMX to derive the register values for your setup.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 6:12 AM
This request pops out here every so often. It's the time for a KB article?
