I2C 總線問題

背景

在通過I2C讀SFP 模塊的時候發(fā)現(xiàn)讀到數(shù)據(jù)不對,現(xiàn)象是感覺丟掉了幾個bit。

調(diào)查

通過測試波形,發(fā)現(xiàn)異常。

原因

有經(jīng)驗的同事指出是I2C 的stretching。
簡單說:從設(shè)備跟不上主設(shè)備的速度,想要跑慢一點。就可以通過拉低住時鐘信號來實現(xiàn)。

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.

搜索相關(guān)資料:
I2C Clock Stretch
clock-stretching/

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容