I2C clock stretching

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I2C clock stretching

2,665 次查看
martindusek
Contributor V

Does Kinetis I2C module support clock stretching? Slave Baud Rate Control function of I2C module is not what I need. My slave just needs to hold low SCL for indeterminate time.

I tried not to clear IICIF flag after master completed transfer of current byte until slave is ready, but that seems not to prevent I2C master to use bus before IICIF is cleared.

Can somebody help me with implementing clock stretching?:

标记 (3)
0 项奖励
3 回复数

1,192 次查看
Derrick
NXP Employee
NXP Employee

Hi Martin,

Yes, the Kinetis I2C module does support slave mode clock stretching.  The slave will hold the clock low until its data register has been either written to or read from (depending upon the transfer direction).  The SBRC bit will control how clock stretching is implemented:

SBRC = 0 :  Clock stretching occurs on the low period during a byte transfer (if the slave's bit transfer rate is slower than the master's), and between bytes until the slave has read/written the data register.


SBRC = 1: Clock stretching occurs only between bytes until the slave has read/written the data register.

Best Regards,

Derrick

0 项奖励

1,192 次查看
bocky
Contributor I

Imx6Ul can set  SBRC ?

0 项奖励

1,192 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

i.MX6UL I2C module register doesn't has SBRC bit

best regards,

Mike

0 项奖励