Hi all,
We have a board we're using that has the standard direct connection between the OMAP35x and the TPS65950 with no extra devices on the bus. This is running the standard BSquare 6.14.00 Windows CE BSP.
We have a test case where we set up the RTC interrupt to fire every second and poll the RTC time. In paralell we have a simple battery driver that interrogates the MADC for battery voltage. If we have both enabled, the I2C interface to the TPS65950 eventually locks up. This is characterised by both SCL and SDA getting held low.
The signals seen on the bus are normal :
When the bus hangs, we see the SDA and SCL held low thus :
In detail, the last transaction there looks like :
When we run this different times, it does die with different register ops, but typically it's always when reading from the RTC regs... An RTC reg dump on the OMAP at this point looks like :
I2C: REV = 0x003c
I2C: IE = 0x0000
I2C: STAT = 0x0000
I2C: WE = 0x0000
I2C: SYSS = 0x0001
I2C: BUF = 0x0505
I2C: CNT = 0x0001
I2C: SYSC = 0x0001
I2C: CON = 0x8600
I2C: OA0 = 0x400e
I2C: SA = 0x004b
I2C: PSC = 0x0009
I2C: SCLL = 0x0005
I2C: SCLH = 0x0007
I2C: SYSTEST = 0x0000
I2C: BUFSTAT = 0x0100
I2C: OA1 = 0x0000
I2C: OA2 = 0x0000
I2C: OA3 = 0x0000
I2C: ACTOA = 0x0000
I2C: SBLOCK = 0x0000
This is obviously a massive problem as it never recovers and renders all comms to the TPS impossible. We've tried resetting the I2C peripheral in the OMAP but to no avail. We then wondered if this is the OMAP or the TPS holding the lines low so we used SYSTEST to set SDA_O and SCL_O high (the documentation is unclear as there's no direction to set but as it's open-collector I assume that output high equates to NOT driving the output and hence high-impedence) Looking at the lines at this point shows them still low so the conclusion is that it must be the TPS pulling the lines down not the OMAP. Note : We would have tested setting GPIO's to input instead as it's a better defined mechanism but the I2C1 balls cannot be re-muxed.
The problem boils down to this : The I2C Specification declares :
In the unlikely event where the clock (SCL) is stuck LOW, the preferential procedure is to reset the bus using the HW reset signal if your I2C devices have HW reset inputs. If the I2C devices do not have HW reset inputs, cycle power to the devices to activate the mandatory internal Power-On Reset (POR) circuit.
AFAICT we can't externally reset the I2C on the TPS65950 without resetting the system which is obviously not an option...!
Yours confusedly,
~Pev