I2c SCL is held low on T104x board

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

I2c SCL is held low on T104x board

1,510 Views
wengangzhu
Contributor II

There is a I2c slave device(0x73) is connected to T104x across a I2C mux device(0x70) on our board. We found i2c bus is held low more then 30 milliseconds by T104x after receive ACK. Could you please explain why T1042x held SCL to low so long time? It may cause i2c slave device entering reset status.

I attached the i2c wave(i2c_write.zip) captured from oscilloscope.

green: scl before i2c mux

red: scl after i2c mux

blue: sda before i2c mux

yellow: sda after i2c mux

Here are the steps for t104x writing data to slave device(0x73):

 1. select i2c mux channel

        write 0x20 to i2c mux(0x70)

2. write slave device(0x73) register 0x0 to 0x2 with smbus protocol. 0xbd is PEC.

       write 0x73 0x00 0x02 0xbd

3. de-select i2c mux

     write 0x0 to i2c mux(0x70)

0 Kudos
7 Replies

1,495 Views
Pavel
NXP Employee
NXP Employee

It looks like that your I2C slave tied SCL low before ACK sending.

See wait-state insertion in I2C Specification. Find the Section 3.1.5 in the following document:

https://www.nxp.com/docs/en/user-guide/UM10204.pdf

0 Kudos

1,491 Views
wengangzhu
Contributor II

Thanks Pavel.

You're right. I2c slave tied SCL to low before ACK sending. That's to say i2c slave is busy and force i2c master into wait status. and the duration of SCL to low before ACK sending is about 300 microseconds. Do you think it's a i2c slave issue?

My question is why t104x held SCL to low more than 30ms from received ACK to stop the transaction.

0 Kudos

1,478 Views
Pavel
NXP Employee
NXP Employee

If the I2Cx_I2CCR[MSTA] bit is changed from 1 to 0, the T1040x generates a STOP condition on I2C bus. See the Section 23.4.3 of the T1040 Reference Manual.

Check your I2C driver code for generation STOP condition on I2C bus,

0 Kudos

1,471 Views
wengangzhu
Contributor II

Hi Pavel,

We're using standard linux driver for T104x i2c(drivers/i2c/busses/i2c-mpc.c). And i2c driver is working with irq mode. We set i2c wait event timeout to 50ms in driver for function i2c_wait().

We added some debug timestamp before and after function i2c_wait(). And found sometimes the execution of function i2c_wait() is exceed 20ms.

two possible reason to cause this issue:

1. t104x i2c interrupt handle did not be trigger by i2c irq.

2. linux system is very busy and cannot wakeup i2c wait event.

Do we have approach to set the priority of t104x i2c irq? thanks.

0 Kudos

1,465 Views
Pavel
NXP Employee
NXP Employee

It looks like that your opinion is correct.

Try to change the priority of t104x i2c irq.

0 Kudos

1,440 Views
wengangzhu
Contributor II

Do you know how to set the priority of t104x i2c irq? thanks.

0 Kudos