r1756 - developers/werner/usb-pullup

werner at sita.openmoko.org werner at sita.openmoko.org
Sat Apr 14 10:30:55 CEST 2007


Author: werner
Date: 2007-04-14 10:30:34 +0200 (Sat, 14 Apr 2007)
New Revision: 1756

Modified:
   developers/werner/usb-pullup/README
   developers/werner/usb-pullup/new.fig
   developers/werner/usb-pullup/new.spice
   developers/werner/usb-pullup/runs
Log:
Went back to an only slightly modified version of the original model.



Modified: developers/werner/usb-pullup/README
===================================================================
--- developers/werner/usb-pullup/README	2007-04-14 06:31:50 UTC (rev 1755)
+++ developers/werner/usb-pullup/README	2007-04-14 08:30:34 UTC (rev 1756)
@@ -3,17 +3,10 @@
 
 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
+2) Add a diode to USB_PULLUP, to prevent it from forcing nRESET
+   if driven high.
 
-   For Q1, Q2, RB1, and RB2 an NXP PEMH14 can be used, so the number
-   of components stays the same.
 
-   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
 ==========
 
@@ -43,16 +36,14 @@
 An example:
 
 RUSB=1000:
-Switches    Q2.IE      V(RUSB)    I(IO_3V3)  V(nRESET)
-:             1.24 mA    1.24  V    1.25 mA    3.02  V  pull-up enabled
-UG:           2.92 pA    2.92 nV   80.21 uA    3.20  V  pull-up disabled
-UP:           1.26 mA    1.26  V    1.27 mA    3.01  V  invalid !
-RG:          27.38 uA   27.38 mV  357.38 uA  320.00 nV  reset
-RG+UG:        1.10 pA    1.10 nV  400.21 uA  320.00 nV  reset
-RG+UP:       53.83 uA   53.83 mV  383.83 uA  320.00 nV  reset (*)
+Switches    Q.IE       V(RUSB)    I(IO_3V3)  V(nRESET)
+:             1.31 mA    1.31  V    1.32 mA    2.97  V  pull-up enabled
+UG:          26.65 nA   26.65 uV  137.25 uA    2.97  V  pull-up disabled
+UP:           1.31 mA    1.31  V    1.32 mA    2.97  V  invalid !
+RG:          26.65 nA   26.65 uV  227.24 uA  217.21 nV  reset
+RG+UG:        7.11 nA    7.11 uV  228.78 uA  154.38 nV  reset
+RG+UP:       26.65 nA   26.65 uV  227.25 uA  217.22 nV  reset
 
 Here, the external load on D+ is 1000 kOhm to ground. The columns
 show the current into the load, the voltage on D+, the total
 current drawn from IO_3V3, and the resulting voltage on nRESET.
-
-(*) Is such a high Q2.IE acceptable in this (probably rare) state ?

Modified: developers/werner/usb-pullup/new.fig
===================================================================
--- developers/werner/usb-pullup/new.fig	2007-04-14 06:31:50 UTC (rev 1755)
+++ developers/werner/usb-pullup/new.fig	2007-04-14 08:30:34 UTC (rev 1756)
@@ -7,129 +7,123 @@
 Single
 -2
 1200 2
-6 10500 7800 11100 8700
+6 7950 6000 10500 7050
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 6000 9600 6000 9600 6300 8700 6300 8700 6000
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 10800 7800 10800 8400
+	 7950 6150 8700 6150
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 10500 8400 11100 8400
-4 1 0 50 -1 2 12 0.0000 4 135 90 10800 8700 0\001
+	 9600 6150 10200 6150
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 10200 6150 10200 6750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 9900 6750 10500 6750
+4 1 0 50 -1 0 12 0.0000 4 135 480 9150 6225 RUSB\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 10200 7050 0\001
 -6
-6 5625 3375 6300 3525
+6 2025 2250 3000 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2400 2550 2400 2250
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2250 2400 2550 2400
 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 3375 5775 3375 5775 3525 5625 3525 5625 3375
-4 0 0 50 -1 0 12 0.0000 4 135 375 5925 3525 RRG\001
+	 2325 3075 2475 3075 2475 3225 2325 3225 2325 3075
+4 0 0 50 -1 0 12 0.0000 4 135 360 2625 3225 RUP\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 2100 2475 1\001
 -6
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4800 3450 300 300 4800 3450 5100 3450
+6 4425 8325 5100 8475
 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6000 5700 6300 5700 6300 6600 6000 6600 6000 5700
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6600 7200 7500 7200 7500 7500 6600 7500 6600 7200
+	 4425 8325 4575 8325 4575 8475 4425 8475 4425 8325
+4 0 0 50 -1 0 12 0.0000 4 135 375 4725 8475 RRG\001
+-6
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2400 8250 300 300 2400 8250 2700 8250
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+	 5400 7650 4500 7650 4500 9000
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8100 6900 8100 7800
+	 4500 7650 4500 6900
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3600 7350 6600 7350
+	 4500 5100 4500 5400
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6150 6600 6150 7350
+	 4350 5250 4650 5250
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4350 6000 4650 6000 4650 6900 4350 6900 4350 6000
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 7350 8100 7350
+	 4500 5550 4500 6000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
+	 4500 7650 2400 7650 2400 7950
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3600 8100 3600 6450
+	 4200 9000 4800 9000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 5400 7650 5850 7350 5850 7950 5400 7650
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3300 8100 3900 8100
+	 5400 7350 5400 7950
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3600 6300 3600 6000
+	 2400 3750 5400 3750
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3450 6150 3750 6150
+	 2400 4800 2400 2700
 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3525 6825 3675 6825 3675 6975 3525 6975 3525 6825
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3525 7575 3675 7575 3675 7725 3525 7725 3525 7575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9300 7650 10200 7650 10200 7950 9300 7950 9300 7650
+	 4350 2100 4650 2100 4650 3000 4350 3000 4350 2100
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8550 7800 9300 7800
+	 4500 3000 4500 3750
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 10200 7800 10800 7800
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
-	1 0 1.00 60.00 120.00
-	 8550 6900 8100 7350 8550 7800
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6300 2700 7200 2700 7200 3000 6300 3000 6300 2700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
-	 6300 2850 5700 2850 5700 4200
+	 4500 1650 4500 2100
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5700 2850 5700 2100
+	 4350 1350 4650 1350
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8100 2400 8100 3300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7200 2850 8100 2850
+	 4500 1200 4500 1500
 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
-	 8100 2850 8550 3300
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8400 1200 8700 1200 8700 2100 8400 2100 8400 1200
+	 2400 8025 2400 8475
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8550 750 8550 1200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
-	 8550 2100 8550 2400 8100 2850
+	 2100 9000 2700 9000
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5700 300 5700 600
+	 2400 8550 2400 9000
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5550 450 5850 450
+	 5400 3450 5400 4050
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 5400 3750 5850 3450 5850 4050 5400 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 5850 3750 6600 3750 6600 7650 5850 7650
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8550 300 8550 600
+	 7500 5250 7500 6150
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8400 450 8700 450
+	 6600 5700 7500 5700
+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
+	 7500 5700 7950 6150
 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5550 1200 5850 1200 5850 2100 5550 2100 5550 1200
+	 7800 4050 8100 4050 8100 4950 7800 4950 7800 4050
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5700 750 5700 1200
+	 7950 3600 7950 4050
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
-	 5700 2850 4800 2850 4800 3150
-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
-	 4800 3225 4800 3675
+	 7950 4950 7950 5250 7500 5700
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5400 4200 6000 4200
+	 7950 3150 7950 3450
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4500 4200 5100 4200
+	 7800 3300 8100 3300
 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4800 3750 4800 4200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6150 5250 6150 5700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6000 4950 6300 4950
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6150 4800 6150 5100
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8550 3300 8550 6900
-4 1 0 50 -1 0 12 0.0000 4 135 795 7050 7050 RB2 = 22k\001
-4 0 0 50 -1 0 12 0.0000 4 180 1200 8400 7425 Q2 (hFE = 200)\001
-4 0 0 50 -1 0 12 0.0000 4 135 720 6450 6225 RU = 47k\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 3600 8400 0\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 5850 7200 7\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 7800 7200 9\001
-4 0 0 50 -1 0 12 0.0000 4 135 360 3825 6975 RUP\001
-4 0 0 50 -1 0 12 0.0000 4 135 390 3750 7725 RUG\001
-4 0 0 50 -1 0 12 0.0000 4 180 5145 3600 9525 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 6225 1\001
-4 1 0 50 -1 0 12 0.0000 4 135 480 9750 7875 RUSB\001
-4 1 0 50 -1 2 12 0.0000 4 135 180 8700 8025 10\001
-4 0 0 50 -1 0 12 0.0000 4 135 705 6000 1725 RR = 33k\001
-4 0 0 50 -1 0 12 0.0000 4 135 765 8850 1725 R1 = 1500\001
-4 1 0 50 -1 0 12 0.0000 4 135 795 6750 2550 RB1 = 22k\001
-4 0 0 50 -1 0 12 0.0000 4 180 1200 8400 2925 Q1 (hFE = 200)\001
-4 0 0 50 -1 2 12 0.0000 4 135 90 5850 1125 1\001
-4 0 0 50 -1 2 12 0.0000 4 135 90 8700 1125 1\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 7650 2700 3\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 8700 2475 4\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 5550 2700 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 840 6000 525 VIO =3.3V\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 5400 525 1\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 8250 525 1\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 5700 4500 0\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 4800 4500 0\001
-4 2 0 50 -1 0 12 0.0000 4 135 555 4350 3675 = 10uA\001
-4 2 0 50 -1 0 12 0.0000 4 135 630 4350 3375 IRESET\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 5850 5025 1\001
-4 1 0 50 -1 2 12 0.0000 4 135 90 8700 5025 5\001
+	 2100 4800 2700 4800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2325 4125 2475 4125 2475 4275 2325 4275 2325 4125
+4 0 0 50 -1 0 12 0.0000 4 135 705 4800 6525 RR = 33k\001
+4 2 0 50 -1 2 12 0.0000 4 135 705 4350 7500 nRESET\001
+4 0 0 50 -1 0 12 0.0000 4 135 840 4800 5325 VIO =3.3V\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 4200 5325 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 4500 9300 0\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 4650 5850 1\001
+4 2 0 50 -1 2 12 0.0000 4 180 1215 4200 3600 USB_PULLUP\001
+4 0 0 50 -1 0 12 0.0000 4 135 720 4800 2625 RU = 22k\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 4200 1425 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 2400 9300 0\001
+4 2 0 50 -1 0 12 0.0000 4 135 555 1950 8475 = 10uA\001
+4 2 0 50 -1 0 12 0.0000 4 135 630 1950 8175 IRESET\001
+4 0 0 50 -1 0 12 0.0000 4 135 765 8250 4575 R1 = 1500\001
+4 0 0 50 -1 0 12 0.0000 4 180 1020 7800 5775 Q (hFE = 50)\001
+4 1 0 50 -1 2 12 0.0000 4 135 135 7050 5550 B\001
+4 1 0 50 -1 2 12 0.0000 4 135 120 8100 5325 C\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 7650 3375 1\001
+4 0 0 50 -1 2 12 0.0000 4 135 90 8100 3825 1\001
+4 1 0 50 -1 2 12 0.0000 4 135 120 7950 6450 E\001
+4 0 0 50 -1 0 12 0.0000 4 135 840 4800 1425 VIO =3.3V\001
+4 1 0 50 -1 2 12 0.0000 4 135 90 2400 5100 0\001
+4 0 0 50 -1 0 12 0.0000 4 135 390 2550 4275 RUG\001

Modified: developers/werner/usb-pullup/new.spice
===================================================================
--- developers/werner/usb-pullup/new.spice	2007-04-14 06:31:50 UTC (rev 1755)
+++ developers/werner/usb-pullup/new.spice	2007-04-14 08:30:34 UTC (rev 1756)
@@ -1,29 +1,36 @@
 USB PULL-UP CIRCUIT (NEW)
 
 VIO 1 0 DC 3.3
-IRESET 2 0 DC 0.00001
+IRESET nRESET 0 DC 0.00001
 
-RR 1 2 10000
-RB1 2 3 47000
-RB2 7 9 47000
-RU 1 7 47000
+RR 1 nRESET 33K
+RU 1 B 22K
 
-R1 1 4 1500
+R1 1 C 1.5K
 
-Q1 4 3 5 QMOD
-Q2 5 9 10 QMOD
+Q C B E QMOD
+DU B USB_PULLUP D1N4148
+DR B nRESET D1N4148
 
 * Change <RUSB> to the respective resistance of the load
-RUSB 10 0 <RUSB>
+RUSB E 0 <RUSB>
+*RUSB E 0 0.0001
 
 * Switch: uncomment to pull nRESET low
-*RRG 2 0 0.001
+*RRG nRESET 0 0.001
 * Switch: uncomment to drive USB_PULLUP high (invalid !)
-*RUP 1 7 0.001
+*RUP 1 USB_PULLUP 0.001
 * Switch: uncomment to drive USB_PULLUP low
-*RUG 7 0 0.001
+*RUG USB_PULLUP 0  0.001
 
-.MODEL QMOD NPN BF=200
+.MODEL QMOD NPN BF=50
+
+* http://www.fairchildsemi.com/models/email_model_file.jsp?file=1N4148.mod
+.MODEL D1N4148 D(Is=5.84n N=1.94 Rs=.7017 Ikf=44.17m Xti=3 Eg=1.11 Cjo=.95p
++                M=.55 Vj=.75 Fc=.5 Isr=11.07n Nr=2.088 Bv=100 Ibv=100u
++		 Tt=11.07n)
+
+
 .OP
-.PRINT OP @Q2[IE] V(10) I(VIO) V(2)
+.PRINT OP @Q[IE] V(E) I(VIO) V(nRESET)
 .END

Modified: developers/werner/usb-pullup/runs
===================================================================
--- developers/werner/usb-pullup/runs	2007-04-14 06:31:50 UTC (rev 1755)
+++ developers/werner/usb-pullup/runs	2007-04-14 08:30:34 UTC (rev 1756)
@@ -2,7 +2,7 @@
 for r in 0.0001 1000 10000 1000000; do
    echo
    echo "RUSB=$r:"
-   echo "Switches    Q2.IE      V(RUSB)    I(IO_3V3)  V(nRESET)"
+   echo "Switches    Q.IE       V(RUSB)    I(IO_3V3)  V(nRESET)"
    for n in '' UG UP RG RG+UG RG+UP; do
 	printf "%-12s" "$n:"
 	sed '/^\*R\('`echo "$n" |





More information about the commitlog mailing list