r1742 - in developers/werner: . usb-pullup
werner at sita.openmoko.org
werner at sita.openmoko.org
Fri Apr 13 21:58:40 CEST 2007
Author: werner
Date: 2007-04-13 21:58:31 +0200 (Fri, 13 Apr 2007)
New Revision: 1742
Added:
developers/werner/usb-pullup/
developers/werner/usb-pullup/README
developers/werner/usb-pullup/new.fig
developers/werner/usb-pullup/new.spice
developers/werner/usb-pullup/old.spice
developers/werner/usb-pullup/runs
developers/werner/usb-pullup/si.pl
Log:
Proposed change of the 49XX USB pullup circuit (for GTA02).
Added: developers/werner/usb-pullup/README
===================================================================
--- developers/werner/usb-pullup/README 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/README 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,65 @@
+Suggested changes
+=================
+
+1) Change R1713 (nRESET pull-up) from 100 kOhm to 33 kOhm
+
+2) Replace R1911, Q4901, R4910, and D4910 with the circuit shown
+ in new.fig
+
+ For Q1, Q2, RB1, and RB2 an NXP PEMH19 can be used, so the number
+ of components stays the same.
+
+ R4910 is split into R1 and R2 in order to bias both transistors.
+ The value of R1 and R2 has been slightly adjusted to compensate
+ for losses over Q1 and Q2.
+
+ This two-transistor solution also eliminates the USB_PULLUP to
+ nRESET path that might allow mis-configured GPIO to keep the
+ device out of reset.
+
+
+Simulation
+==========
+
+The goal of this simulation is only to obtain indicative results.
+For a more comprehensive analysis, the transistors should be modeled
+with more detail, and component tolerances should be taken into
+account.
+
+
+Reference data from the old solution (nRESET omitted for simplicity)
+--------------------------------------------------------------------
+
+USB_PULLUP Q2.IE I(IO_3V3) Description
+Z 1.44 mA 1.45 mA pull-up enabled
+L 3.3 pA 70.2 uA pull-up disabled
+
+Note: to compare power consumption with the new circuit, add 10 uA
+to I(IO_3V3).
+
+
+New circuit
+-----------
+
+The simulation also models the 10 uA the CPU may draw on nRESET.
+To perform all simulations shown here, simply run "./runs".
+
+USB attached:
+
+Switches Q2.IE I(IO_3V3) V(nRESET)
+USB: 2.09 mA 2.10 mA 2.63 V pull-up enabled
+USB+UG: 2.26 pA 58.11 uA 2.96 V pull-up disabled
+USB+UP: 2.31 mA 2.32 mA 2.61 V invalid !
+USB+RG: 3.04 pA 100.00 uA 90.00 nV reset
+USB+RG+UG: 0.00 pA 100.00 uA 90.00 nV reset
+USB+RG+UP: 184.93 uA 284.92 uA 90.00 nV reset (*)
+
+
+Without USB:
+
+Switches Q2.IE I(IO_3V3) V(nRESET)
+: 0.00 pA 10.00 uA 2.97 V pull-up enabled
+UG: 0.00 pA 58.11 uA 2.96 V pull-up disabled
+RG: 0.00 pA 100.00 uA 90.00 nV reset
+
+(*) Is such a high Q2.IE acceptable in this (probably rare) state ?
Added: developers/werner/usb-pullup/new.fig
===================================================================
--- developers/werner/usb-pullup/new.fig 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/new.fig 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,127 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+6 3225 3975 3900 4125
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 3225 3975 3375 3975 3375 4125 3225 4125 3225 3975
+4 0 0 50 -1 0 12 0.0000 4 135 375 3525 4125 RRG\001
+-6
+6 8250 7200 8850 8100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 8550 7200 8550 7800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 8250 7800 8850 7800
+4 1 0 50 -1 2 12 0.0000 4 135 90 8550 8100 0\001
+-6
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2400 4050 300 300 2400 4050 2700 4050
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 3900 3300 4800 3300 4800 3600 3900 3600 3900 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+ 3900 3450 3300 3450 3300 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3300 3450 3300 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 5700 3000 5700 3900
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 4800 3450 5700 3450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+ 1 0 1.00 60.00 120.00
+ 5700 3450 6150 3900
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 6000 1800 6300 1800 6300 2700 6000 2700 6000 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6150 1350 6150 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+ 6150 2700 6150 3000 5700 3450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6150 3900 6150 5100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3300 900 3300 1200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3150 1050 3450 1050
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6150 900 6150 1200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6000 1050 6300 1050
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 3150 1800 3450 1800 3450 2700 3150 2700 3150 1800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3300 1350 3300 1800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 6900 4350 7800 4350 7800 4650 6900 4650 6900 4350
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6150 4500 6900 4500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+ 3300 3450 2400 3450 2400 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+ 1 0 1.00 60.00 120.00
+ 2400 3825 2400 4275
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
+ 1 0 1.00 60.00 120.00
+ 7800 4500 8550 4500 8550 6300 8100 6750 8550 7200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3000 4800 3600 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 2100 4800 2700 4800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 2400 4350 2400 4800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 6000 5100 6300 5100 6300 6000 6000 6000 6000 5100
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 6600 6600 7500 6600 7500 6900 6600 6900 6600 6600
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 8100 6300 8100 7200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3600 6750 6600 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 6150 6000 6150 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 7500 6750 8100 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3600 7500 3600 5850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3300 7500 3900 7500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3600 5700 3600 5400
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+ 3450 5550 3750 5550
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 3525 6225 3675 6225 3675 6375 3525 6375 3525 6225
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+ 3525 6975 3675 6975 3675 7125 3525 7125 3525 6975
+4 0 0 50 -1 0 12 0.0000 4 135 705 3600 2325 RR = 33k\001
+4 0 0 50 -1 0 12 0.0000 4 135 675 6450 2325 R1 = 680\001
+4 1 0 50 -1 0 12 0.0000 4 135 795 4350 3150 RB1 = 22k\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 6000 3525 Q1 (hFE = 200)\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 3450 1725 1\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 6300 1725 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5250 3300 3\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 6300 3075 4\001
+4 1 0 50 -1 0 12 0.0000 4 135 675 7350 4200 R2 = 680\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 6000 4575 5\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3150 3300 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 840 3600 1125 VIO =3.3V\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3000 1125 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5850 1125 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3300 5100 0\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 2400 5100 0\001
+4 1 0 50 -1 0 12 0.0000 4 135 795 7050 6450 RB2 = 22k\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 8400 6825 Q2 (hFE = 200)\001
+4 0 0 50 -1 0 12 0.0000 4 135 720 6450 5625 RU = 47k\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3600 7800 0\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 5850 6600 7\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 8700 5625 8\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 7800 6600 9\001
+4 1 0 50 -1 2 12 0.0000 4 135 180 8700 7275 10\001
+4 0 0 50 -1 0 12 0.0000 4 135 360 3825 6375 RUP\001
+4 0 0 50 -1 0 12 0.0000 4 135 390 3750 7125 RUG\001
+4 0 0 50 -1 0 12 0.0000 4 180 5145 3600 8925 Q1, Q2, RB1, and RB2 are integrated in an NXP PEMH19 dual NPN\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 3300 5625 1\001
+4 2 0 50 -1 0 12 0.0000 4 135 555 1950 4275 = 10uA\001
+4 2 0 50 -1 0 12 0.0000 4 135 630 1950 3975 IRESET\001
Added: developers/werner/usb-pullup/new.spice
===================================================================
--- developers/werner/usb-pullup/new.spice 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/new.spice 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,30 @@
+USB PULL-UP CIRCUIT (NEW)
+
+VIO 1 0 DC 3.3
+IRESET 2 0 DC 0.00001
+
+RR 1 2 33000
+RB1 2 3 22000
+RB2 7 9 22000
+RU 5 7 47000
+
+* Drop IO_3V3 in two steps, so that we get a useful bias on each transistor
+R1 1 4 680
+R3 5 8 680
+
+Q1 4 3 5 QMOD
+Q2 8 9 10 QMOD
+
+* Switch: uncomment to pull nRESET low
+*RRG 2 0 0.001
+* Switch: uncomment to drive USB_PULLUP high (invalid !)
+*RUP 1 7 0.001
+* Switch: uncomment to drive USB_PULLUP low
+*RUG 7 0 0.001
+* Switch: uncomment to connect USB
+*RUSB 10 0 0.001
+
+.MODEL QMOD NPN BF=200
+.OP
+.PRINT OP @Q2[IE] I(VIO) V(2)
+.END
Added: developers/werner/usb-pullup/old.spice
===================================================================
--- developers/werner/usb-pullup/old.spice 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/old.spice 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,15 @@
+USB PULL-UP CIRCUIT (OLD)
+
+VIO 1 0 DC 3.3
+
+R4911 1 2 47000
+Q4901 1 2 4 QMOD
+R4910 4 0 1500
+
+* Switch: uncomment to pull USB_PULLUP low
+*RUG 2 0 0.001
+
+.MODEL QMOD NPN BF=200
+
+.OP
+.END
Added: developers/werner/usb-pullup/runs
===================================================================
--- developers/werner/usb-pullup/runs 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/runs 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,14 @@
+#!/bin/sh
+echo "Switches Q2.IE I(IO_3V3) V(nRESET)"
+for n in USB USB+UG USB+UP USB+RG USB+RG+UG USB+RG+UP \
+ '' UG RG; do
+ printf "%-16s" "$n:"
+ sed '/^\*R\('`echo "$n" |
+ sed 's/+/\\\\|/g'`'\) /s/^.//' <new.spice |
+ spice -b 2>/dev/null |
+ sed '/^0 */s///p;d' |
+ perl si.pl A A V
+done
+
+# Don't know why SPICE complains about my .PRINT commands. It does the right
+# calculations anyway.
Property changes on: developers/werner/usb-pullup/runs
___________________________________________________________________
Name: svn:executable
+ *
Added: developers/werner/usb-pullup/si.pl
===================================================================
--- developers/werner/usb-pullup/si.pl 2007-04-13 17:06:20 UTC (rev 1741)
+++ developers/werner/usb-pullup/si.pl 2007-04-13 19:58:31 UTC (rev 1742)
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+sub cvt
+{
+ $_[0] =~ /-?(\d.\d+)e[-+](\d+)/ || die "$_[0]";
+ $m = $1;
+ $e = $2;
+ $p = " ";
+ while ($e % 3) {
+ $m *= 10;
+ $e++;
+ }
+ if ($e > 9) {
+ $p = "p";
+ $e -= 12;
+ }
+ elsif ($e > 6) {
+ $p = "n";
+ $e -= 9;
+ }
+ elsif ($e > 3) {
+ $p = "u";
+ $e -= 6;
+ }
+ elsif ($e > 0) {
+ $p = "m";
+ $e -= 3;
+ }
+ while ($e > 0) {
+ $m /= 10;
+ $e--;
+ }
+ print sprintf("%6.2f",$m)." $p";
+}
+
+while (<STDIN>) {
+ chop;
+ s/^\s*//;
+ s/\s*$//;
+ $i = 0;
+ for (split(/\s+/)) {
+ &cvt($_);
+ print "@ARGV[$i] ";
+ $i++;
+ }
+ print "\n";
+}
Property changes on: developers/werner/usb-pullup/si.pl
___________________________________________________________________
Name: svn:executable
+ *
More information about the commitlog
mailing list