STM32 I2C Lecture 2 : I2C modes

  • Post author:
  • Post category:Blog

 

I2C Mode

 

I2C modes:

There are several possible operating modes for I2C communication. All are compatible in the 100 kbit/s standard mode may always be used, but combining devices of different capabilities on the same bus can cause issues from Figure 1.

Figure 1. I2C modes and their data rates.
Figure 1. I2C modes and their data rates.

 

 

Standard mode:

The first one is standard mode, and its data rate is up to 100Kbps, and almost all STM32 microcontrollers support this mode. The standard mode was the very first mode introduced when the first I2C specification was released. So, standard mode devices are not upward compatible, and they cannot communicate with the devices of fast mode and above.

For example, if the sensor supports only in standard mode and then it cannot communicate with the master, which promotes fast mode.

Fast mode:

Fast mode is highly compatible and supports data rate up to 400Kbps, and almost all STM32F4x microcontrollers support this mode. I2C slave devices widely support fast mode, so a master may use it as long as it knows that the bus capacitance and pull-up strength allow it.

Fast mode devices are downward compatible and can communicate with the standard mode devices in a 0 to 100Kbps I2C bus system.

Fast mode+:

In the fast mode plus the data rate is up to 1Mbps and using more powerful drivers and pull-ups to achieve faster rise and fall times. Some of the STM32F4x microcontrollers support this mode. 

High-speed mode:

The last mode is high-speed mode, and here, the data rate is up to 3.4Mbps. High-speed mode is compatible with standard I2C devices on the same bus but requires the master has an active pull-up on the clock line is enabled during high-speed transfers.

The STM32F4x family does not support this mode. So, configuring of I2C modes is very important when writing the drivers.

In the following article, let’s understand I2C Protocol.

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply