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.
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.