Other Parts Discussed in Thread: AM3354
I'm trying to solve a problem in I2C communication.
We use three I2C interfaces on an AM3354 with our custom baremetal software. I discovered a strange behaviour on one of the three buses, where a write/read transaction is performed every 50ms (as master).
It generally works without problems, but very sporadic a kind of "clockstretch" occurs, where the SCL line is held low, after writing a value to the slave. The following image shows this behaviour:
Investigating this behaviour, I saw that always the same interrupts are handled as expected, so there is no erroneous sequence of interrupts. The last interrupt handled is always XDR (IRQ_STATUS-register reads 0x0000 4000). While digging a little deeper, I found out that DCOUNT of I2C1_CNT-register and TXSTAT of I2C1_BUFSTAT-register is not 0, although the byte was written to the bus (0x50, as visible in the image above).
The following image shows all registers at the time of the strange "clockstretch":
Generally I could issue a bus reset (which actually is what I'm doing after a certain timeout), but as there are devices connected to the bus, which do not fulfill the I2C spec regarding the bus reset and might hang after a reset, I have to find the cause for this behaviour.
So what could cause this effect? For me it seems as if writing I2C1_DATA does not cause I2C1_CNT and I2C1_BUFSTAT to update.
Any influence of a slave device, which might hold the SCL low, can be excluded, as measurements on our custom hardware clearly showed that the AM3354 holds SCL low.
If you need additional information, let me know.
Many thanks in advance
Thomas

