STM32 I2C Lecture 4 : I2C start and stop conditions

  • Post author:
  • Post category:Blog

 

I2C Start and Stop Conditions

 

 


STM32 I2c bus protocol start and stop conditions
Figure 1. I2C bus protocol

 

In this article, let’s discuss the start and stop conditions that are generated by the master.

Each I2C command initiated by the master device starts with a START condition and ends with a STOP condition.

For both conditions, SCL has to be high. A high to low transition of SDA is considered as START and a low to high transition as STOP. After the Start condition, the bus is considered as busy and can be used by another master only after a Stop condition is detected.

After the Start condition, the master can generate a repeated Start. Repeated start means, without issuing a STOP condition making one more START condition and this is equivalent to a standard START and is usually followed by the slave I2C address. After the STOP condition, both SDA and SCL are released, which means both are in a pull-up state.

Remember that both start and stop conditions are made in master mode by software. The bus is considered to be busy after the START condition, and the bus is considered to be free again a specific time after the STOP condition. When the bus is free, another master can get the chance to claim the bus for data communication. The bus stays busy if repeated START is generated instead of the STOP condition.

The most of the microcontroller’s I2C peripherals support both master and slave mode. Because when the peripheral makes START condition, the mode is automatically in master mode and when it generates STOP condition, the mode goes to slave mode.

 

Few notes about START and STOP conditions:

  • A single message can contain multiple START conditions. The use of this is so-called “repeated START” is common in I2C.
  • STOP condition always denotes the end of the transmission even if it is issued in the middle of the transaction or the middle of a byte.

 

In the following article, let’s see I2C ACK and NACK and I2C data validity.

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