I2C clock stretching

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C clock stretching

2,561 Views
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?:

Tags (3)
0 Kudos
3 Replies

1,088 Views
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 Kudos

1,088 Views
bocky
Contributor I

Imx6Ul can set  SBRC ?

0 Kudos

1,088 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

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

best regards,

Mike

0 Kudos