annotate DUART28-PPD-surprise @ 90:5952e2dfdc26

FC-handset-spec section 4.4: update for current situation
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 Apr 2022 06:28:41 +0000
parents 2ac10b2cde4f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 DUART28 partial power-down surprise behaviour
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 =============================================
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 FreeCalypso DUART28 adapter was specifically designed to handle partial
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 power-down scenarios as gracefully as possible. There are two possible PPD
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 scenarios:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 1) USB host is connected (USB power present), but the connected Calypso device
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 is in the switched-off state in the Iota VRPC sense. This condition occurs all
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 the time in standard FreeCalypso workflows.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 2) The connected Calypso device is up and running, but there is no USB host
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 connected. This scenario is practically relevant only when the Calypso device
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 is equipped with LCD and keypad peripherals and runs handset firmware that is
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 capable of untethered operation.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 As we have learned through experience with Caramel2 boards, PPD scenario 1
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 would be best handled on the Calypso device side by inserting an LVC buffer
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 powered from Calypso V-IO into Calypso input signal paths, rather than on the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 USB adapter side. However, for already existing Calypso boards which don't have
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 any such LVC buffers, DUART28 provides some improvement over the alternatives:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 current feeding into powered-down Calypso inputs is reduced to 1.27 mA per pin,
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 and the outputs from the adapter are 2.8V rather than 3.3V.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 For PPD scenario 2 (which matters for Caramel2 in the Luna configuration) we
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 were hoping that the combination of LVC input and output buffers on the DUART28
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 side and UART data line pull-up resistors on the Caramel2 side would do the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 trick, and produce the graceful behaviour we were after. Unfortunately though,
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 this PPD scenario does not work as well in practice as we hoped for at design
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 time.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 DUART28 design includes pull-up resistors to the adapter's 2.8V rail in front of
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 all 6 LVC input buffers. These pull-up resistors are there to keep these LVC
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 inputs from floating (and thus propagating garbage, possibly even rapidly
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 oscillating garbage, to FT2232D inputs) in the following scenarios:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 1) PPD scenario 1;
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 2) Even more importantly, partial connection scenarios. DSR input is currently
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 expected to be almost always unconnected, as none of our Calypso devices except
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 GTM900 feature DSR outputs; RI input is likewise connected only very rarely
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 (only available on Caramel2 and requires a separate wire connection), and there
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 is no DCD output on FCDEV3B, causing DCD input to be unconnected as well when
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 working with FCDEV3B.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 However, these pull-up resistors create a nasty surprise in PPD scenario 2:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 current from Calypso outputs flows in the reverse direction through these
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 pull-up resistors into the powered-down DUART28 adapter's P_2V8 rail, enough
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 power flows into that rail to power up the other LVC buffer serving adapter
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 outputs, those outputs drive low because the inputs coming from FT2232D are
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 powered-down low, and the inputs to Calypso UARTs become low instead of high.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Calypso UARTs apparently don't like it when their RxD inputs are continuously
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 low (break condition), and all Calypso sleep modes are disabled as the result.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 The lack of sleep becomes visible on Caramel2 with the yellow STATUS LED
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 remaining lit continuously, rather than flashing with sleep-wake activity as it
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 does in expected normal operation.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 What is incredible about this erratic behaviour scenario is how little power it
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 takes to turn on the LVC buffer serving adapter outputs. With 3 out of 4
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 Calypso outputs driving high, the maximum total current that can flow through
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 the 3 100 kOhm resistors that stand in the way is 84 uA. The voltage measured
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 at the P_2V8 circuit node in this condition is about 1.22 V, i.e., out of the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 2.8 V put out by Calypso, about 1.6 V drops across the 100 kOhm resistors (thus
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 it seems that only about 16 uA flows through each resistor), and the unlucky
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 74LVC541A buffer IC gets powered up with just 48 uA at 1.22 V. In this erratic
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 condition, the outputs of this buffer IC drive low strongly enough to overpower
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 the 100 kOhm pull-ups on Calypso inputs, and those latter inputs sense low
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 instead of high.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 Measuring voltages at other circuit nodes in this state, we see that P_5V rests
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 at about 0.89 V - we are seeing reverse leakage through the 2.8V LDO regulator,
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 from its output to its input. However, P_3V3 (the output of the other LDO
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 regulator) rises to no more than 8 mV - thankfully, not enough power comes in
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 through these back paths to turn on another separate LDO, and no spurious resets
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 are triggered via the 74LVC2G07 boot control circuit.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 Possible solutions
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 ==================
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 There are two general approaches we can take:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 1) We can create DUART28 V2 with a more complex design for these pull-ups:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 perhaps we can insert diodes somewhere to block the reverse current flow through
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 pull-up resistors, or seeing that P_3V3 is not powered on by this erratic back
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 feeding, we could add a third separate LDO regulator just for these pull-ups.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 2) We can just live with this defect, as it is not particularly serious.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 It is worth noting that the erratic behaviour in question occurs ONLY in PPD
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 scenario 2, and this PPD scenario is relevant ONLY for Caramel2+Luna setups:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 not for FCDEV3B, and not for Caramel2 used in a modem configuration. Given how
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 few FC community members are expected to work with Luna, and given that we have
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 a large surplus of unsold DUART28 boards, a simple solution would be to issue
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 two DUART28 boards to every community member who works with Luna, keep one board
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 unmodified (all 6 input pull-up resistors intact per the original design), and
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 modify the other board for Caramel2+Luna configuration.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 If a DUART28 adapter board is to be modified specifically for C2+Luna, the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 modification will consist of removing 4 0402 discrete resistors: R11, R12, R14
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 and R16. These are pull-up resistors on RxD, CTS, DCD and RxD2 inputs - these
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 4 signals are the ones driven from Caramel2+Luna to DUART28. OTOH, the other
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 two pull-up resistors for DSR and RI need to remain: there is no DSR output on
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 Caramel2, and Calypso GPIO1 (which could otherwise be RI) is made inaccessible
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 by Luna cabling.
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 A DUART28 adapter board that has been modified in this manner should be used
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 only with Caramel2 and not with FCDEV3B. (Connecting FCDEV3B would result in a
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 floating LVC buffer input propagating garbage to FT2232D DCD input, which is
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 bad.) Furthermore, even with Caramel2 (with or without Luna) certain user
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 behaviours will need to be adjusted when using a sans-pull-up DUART28 adapter:
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 specifically, all operations with fc-loadtool (flashing), fc-iram (miscellaneous
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 run-from-RAM programs) and fc-xram (FFS editor) need to be performed through the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 secondary UART (the one that carries RVTMUX with running firmware), rather than
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 the primary UART that carries the main AT command channel. In contrast, the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 ttyUSB device corresponding to the primary UART should only be opened when the
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 Calypso+Iota chipset is switched on and the firmware is running. The reason
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 for these user guidelines is that when a modified-DUART28 ttyUSB port is opened
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 while the Calypso+Iota chipset is switched off, FT2232D inputs will be receiving
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 garbage. The primary UART channel has flow control and modem control signals,
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 whereas the secondary UART is data leads only - thus the Linux host will see
2ac10b2cde4f DUART28-PPD-surprise article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 less bogosity on the latter.