Hi Grant
22 Ohms series resistor is fine. When you have something actually connected to the port then it may be necessary to change the resistance (although 22 is usually close enough). The 22 can stay as a place holder, and only those customers needing to fine-tune the signals can change to something different.
I believe that the GPIO drive strength can be modified (and if I am not mistaken it is currently set to 2mA). Please change the drive strength up to 16mA, this should make the low levels lower. Here is a somewhat simplified diagram of the I2C circuit:
When the SOC pulls it’s output low a number of things start to happen.
1) The SOC is sinking current from it’s internal pull-up resistor (R1)
2) The SOC is sinking current from the level shifter internal pull-up (R2)
3) As the levels drop to about 1V at the left side of the level shifter the pass transistor starts to turn on.
4) As the pass transistor turns on the voltage at the right side of the level shifter also starts to drop and current flows through the pass transistor towards the SOC.
5) As the levels on the right side of the level shifter get even lower, the SOC is sinking current from R3, R4, and R5 (all in parallel).
6) The SOC hits it’s current limit (2mA) and refuses to drive the output voltage lower.
There is a small voltage drop across the pass transistor in the level shifter but for this simplified computation we can ignore it. Assuming we are using TXS0108E level shifter, approximate values for the resistors are:
R1=40k (assuming you haven’t turned it off)
R2=R3=40k Ohms (actually it starts out as 10kOhms and only after you get below 0.8V does it change to 40kOhms so the calculations below are optimistic)
R4 = 5k Ohms (I am not sure what value you selected for your board)
R5 = 2.2k Ohms (depends on what Seed Studio module you have connected, they seen to vary between 2.2k and 10k for the modules I have looked at).
Assuming that the SOC output were able to drive to 0.4V (a nice valid low level, the total current from the 1.8V (Left) side of the level shifters (1.8-0.4=1.4V) would be:
IL = 1.4/R1 + 1.4/R2 = 1.4/40,000 + 1.4/40,000 = 70uA (micro Amps, OK so far)
And on the right side (3.3-0.4=2.9V) (things get worse if you are running a 5.0V device).
IR= 2.9/R3 +2.9/R4 +2.9/R5 = 72uA + 508uA + 1.32mA = 1.97mA
Total current IL + IR = 2.04mA or just above the limit of the SOC. Hence my recommendation to turn the drive strength of the SOC to max (16mA). This should really help your low levels.
One other thing I noticed with the TXS0108E, if you get too much capacitance load on the output (example a Seeed Studio hub and 3 devices, all connected by 6 inch Seeed cables) the output will burst into oscillation at ~35MHz. you can’t see this with a voltmeter, but everything stops working.
Lawrence King lking@qti.qualcomm.com
Engineer, Sr. Staff/Manager
Qualcomm Canada Inc.
(905)482-5403 desk (x25403)
(416)627-7302 cell
From: Mark Brown [mailto:mark.brown@linaro.org]
Sent: Tuesday, November 10, 2015 9:34 AM
To: Grant Likely <grant.likely@linaro.org>
Cc: Akira Tsukamoto <akira.tsukamoto@linaro.org>; David Mandala <david.mandala@linaro.org>; King, Lawrence <lking@qti.qualcomm.com>; mezzanine@lists.96boards.org; Gandhi, Ketal <ketalg@qti.qualcomm.com>; George Grey <george.grey@linaro.org>; Koen Kooi <koen.kooi@linaro.org>; 96boards-team <96boards-team@linaro.org>
Subject: Re: Sensors board Rev B - call for review (v2)
On 10 November 2015 at 14:31, Grant Likely <grant.likely@linaro.org> wrote:
After doing a bunch of testing here at home, I've got 22ohm resistors
in series on the i2c, but I didn't add them to the SPI lines. The SPI
lines are driven through a push-pull driver, will it still be
necessary to have in-line resistors for SPI?
Not an EE but the SPI designs I've seen with long traces have had them due to reflections.