STM32 I2C clock stretching

STM32 I2C clock stretching

In an I2C communication, the master device determines the clock speed. Unlike RS232 the I2C bus provides an explicit clock signal which relieves master and slave from synchronizing exactly to a predefined baud rate.

However, there are situations where an I2C slave is not able to co-operate with the clock speed given by the master and needs to slow down a little. This is done by a mechanism referred to as clock stretching.

An I2C slave is allowed to hold down the clock if it needs to reduce the bus speed. The master, on the other hand, is required to read back the clock signal after releasing it to the high state and wait until the line has actually gone high.

STM32 I2C clock stretching_第1张图片
STM32 I2C clock stretching_第2张图片

Reference link

I2C clock stretching

你可能感兴趣的:(STM32学习笔记,stm32,嵌入式硬件,单片机)