I am seeing the same kind of thing on my board. I removed the pull-up resistors on the target device, and on my board to get the device working correctly (a Seed Studio light sensor).
Looking at the TXS0108 datasheet I see the output drive capabilities: [cid:image011.png@01D11657.85BE1D90]
As you can see they only drive up to 1mA (1,000uA). Your pull-up resistors are what is holding the output from going really low. However that isn’t the whole story, these currents are just what the chip drives while accelerating the rise or fall. Looking at the block diagram we see: [cid:image012.png@01D11657.85BE1D90] You can see a pass transistor between A8 and B8, once A8 starts to pull low the current is passing from B8 through the pass transistor to A8. The current then flows from A8 to the SOC, hence the low is limited by the SOC. In the case of the 410 SOC the output drive strength can be programmed between 2mA and 8mA or 16mA (I have forgotten which), and I believe that the default is 2mA. Above 2mA flowing through the pass transistor the voltage will start to rise. I think we need to change the default drive strength to MAX at least on the I2C ports, but probably on all of the other ports.
Lawrence King firstname.lastname@example.org:email@example.com Engineer, Sr. Staff/Manager Qualcomm Canada Inc. (905)482-5403 desk (x25403) (416)627-7302 cell
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Grant Likely Sent: Monday, November 02, 2015 7:41 PM To: firstname.lastname@example.org; King, Lawrence email@example.com; George Grey firstname.lastname@example.org; David Mandala email@example.com; 96boards-team firstname.lastname@example.org Subject: Debugging i2c issues
(This got interesting enough that I ended up also making it a blog post here: http://www.secretlab.ca/archives/164)%E2%80%8B
I've made some progress on the i2c issues seen with the sensors board. I hooked up a pca9306 level shifter and compared the behaviour on the sensors board using an oscilloscope. All of this testing is done with Seeed's Grove RGB LCD module. The LCD module is useful because it actually has 2 i2c devices embedded in it, the LCD controller at address 0x3e, and the RGB controller at 0x62. The two devices operate independently with different electrical properties.
On Hikey+sensors (TXS0108) the LCD locks the bus, and RGB will work, but only after pulling the ribbon cable apart to reduce crosstalk due to insufficient pullups On Hikey+pca9306 the LCD isn't detected and the RGB works correctly (undetermined if there are crosstalk issues)
The traces below show both sides of the level shifter. Green and blue on the top for the data line. Orange and purple on the bottom with the clock.
First, what I saw on using Hikey+pca9306+RGB: [Inline image 1]
And with the LCD:
[Inline image 2]
In both traces you can see the start condition (data goes low while clock is high), the 7 bits of address (7 rising clock edges), the R/W bit (1 rising clock), and then the acknowledgement bit driven by the device. If the controller doesn't see the device drive the data line low on the 9th clock, then it decides the device isn't there and it terminates the transaction. It is easy to recognize the ack bit because the device has a different drive strength and the voltage level is different.
The RGB controller is a happy little device and it jumps at the chance to drive the data line low. It goes right down pretty close to 0V. The LCD on the other hand is sulky and doesn't drive the line quite as low as the controller can. About to 1V. 1V is probably recognized as a logic low on a 5V device, but with 1.8V it is not even less than half. The way the pca9306 level shifter works is there are pull-up resistors on either side of the device that draws each side up to its respective high level. In this case, 1.8V and 5V. When either side gets driven low, the level shifter begins to conduct and the other side also gets drawn down to the same voltage, but it can only go as low as the voltage it is driven to. If it only gets driven down to 1V, then it will never get low enough for a 1.8V controller to recognize it as a low state.
It may be that with weaker pull-ups the LCD will be able to drive to a lower voltage level. I'll need to experiment more, but in the mean time let's move onto the Sensors board. Back to the traces:
First, here is a transaction to address 0x63 with no device present:
[Inline image 3]
Looks perfectly normal so far. Next, the RGB device at address 0x62:
[Inline image 4]
Also behaving the same way as it did with the pca9306. Finally, an LCD transaction:
[Inline image 5]
Again we see the start condition, the 7 data bits and 1 r/w bit, but the ack bit looks weird. The LCD successfully drives the data bit low enough to be recognized, but then something weird happens. The data line stays low and the clock stops running. I don't know actually know what is happening here, but I've got my suspicions. The LCD is continuing to drive the data line low, (you can tell by the slightly different voltage level) but keeping data low should not stop the clock. I suspect the txs0108 is getting confused and driving the clock line high. I've come across reports from others having trouble with the txs010x series on i2c. It has 'one-shot' accelerators to reduce rise time by driving the line high.
Now I need to decide what to do next. Rev B of the design is ready, but there is still the i2c issue that needs to be solved. I may need to put the pca9306 parts into the design which will require some more rework before it goes to manufacturing.