美文网首页
Clock Stretching in I2C Bus

Clock Stretching in I2C Bus

作者: yestyle | 来源:发表于2017-05-06 11:12 被阅读42次

Clock stretching, sometimes referred to as clock synchronization, is a mechanism used by an I2C slave to notify the master to slow down the clock speed.

I2C devices can slow down communication by stretching SCL: During an SCL low phase, any I2C device on the bus may additionally hold down SCL to prevent it from rising again, enabling it to slow down the SCL clock rate or to stop I2C communication for a while. This is also referred to as clock synchronization.

This situation may happen when the slave is waiting for its internal operation to finish, such as EEPROM read/write, sensor data calculation, internal state machine to settle down, and so on.

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.

As described above, to implement clock stretching mode (a.k.a blocking mode) in a master side, it is required to read back the SCL after releasing it to the high state, and wait until the line has actually gone high.

If you are using a I2C controller as a master, the clock stretching is usually handled by the I2C controller in hardware level. But if the master communicates with the slave via GPIO, it needs to be accomplished in software level (driver code).

But the problem is, according to I2C Primer, the I2C specification does not specify any timeout conditions for clock stretching, i.e. any device can hold down SCL as long as it likes.

So what if the slave holds down the SCL permanently, or for a long unacceptable time?

What a quirky slave!

相关文章

  • Clock Stretching in I2C Bus

    Clock stretching, sometimes referred to as clock synchron...

  • 张高兴的 .NET Core IoT 入门指南:(三)使用 I2

    什么是 I2C 总线 I2C 总线(Inter-Integrated Circuit Bus)是设备与设备间通信方...

  • I2C 协议

    I2C协议概述 I2C 协议由两根信号线组成,分别是 SDA 和 SCL。分别代表 Data 和 Clock。 其...

  • 2019-05-06 nano操作I2C

    Nano扩展口有两组I2C,分别为bus0 bus1 接口定义如下: https://www.jetsonhack...

  • I2C通信一

    一、什么是I2C通信 物理接口:SCL + SDA(1) SCL(serial clock):时钟线,传输CLK信...

  • 英语单词(六)

    1. brand stretching 品牌扩张 brand stretching of Stabucks 星巴克...

  • 2018-03-07

    Over-stretching? Yoga ① Half a century after the Beatles ...

  • kernel I2C总线驱动

    I2C总线驱动# I2C体系结构## I2C核心提供I2C总线驱动和设备驱动的注册、注销方法 I2C总线驱动是对I...

  • i2c

    彻底搞懂I2C总线(一)什么是I2C?什么是I2C总线?什么是I2C规范[https://www.163.com/...

  • 【每周一译_w4】极尽可能

    原文标题:Stretching The Limits Of What’s Possible 作者:Cosima M...

网友评论

      本文标题:Clock Stretching in I2C Bus

      本文链接:https://www.haomeiwen.com/subject/tdyetxtx.html