comparison doc/Pirelli-loadtools-entry @ 955:803e926e0699

doc/Pirelli-loadtools-entry: new article
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 07 Jun 2023 23:52:09 +0000
parents
children
comparison
equal deleted inserted replaced
954:21604c3413c1 955:803e926e0699
1 Pirelli DP-L10 phone is a quirky Calypso target in that the same hardware
2 interface (USB) that provides access to the one easily accessible Calypso UART
3 also feeds charging power to the phone. The result of this arrangement is that
4 whenever you connect your phone to your computer for communication, programming
5 or tinkering, the charging voltage is always present and the Calypso+Iota
6 chipset never enters switched-off state: every "soft poweroff" operation is
7 converted by the hardware into a deep reboot.
8
9 You can force a "cold programming boot" cycle on your Pirelli phone by removing
10 the battery, connecting USB to the "debattered" phone, running fc-loadtool on
11 the ttyUSB device that appears, and then inserting the battery in one swift
12 motion - this sequence will be necessary if you brick your flash and need to
13 unbrick it - but of course it is hugely inconvenient for ordinary FreeCalypso
14 tinkering (such as running FreeCalypso VPM firmware builds via fc-xram), and
15 doing it too often will ruin battery spring contacts. The other alternative is
16 to let Pirelli's official fw boot fully (including GSM network registration) in
17 between cycles of fc-loadtool or fc-xram, and then do the switch-off operation
18 from the UI (press and hold red button on unlocked home screen) with fc-loadtool
19 or fc-xram running. But this option is also unattractive, as it involves
20 unwanted SIM bring-up and GSM network registration from Pirelli's fw.
21
22 As of fc-host-tools-r19 we have an improved solution in the form of -Petmoff
23 option to fc-loadtool, fc-xram, fc-simint etc. The usage scenario is as
24 follows:
25
26 * The phone needs to be in its "booted for charging only" state. With Pirelli's
27 official fw, this state is entered when you connect USB to a switched-off
28 phone, or when you execute the switch-off sequence from the UI with USB
29 connected.
30
31 * In this state, you issue a command like the following:
32
33 fc-loadtool -h pirelli -Petmoff /dev/ttyUSB0
34
35 or
36
37 fc-simint -h pirelli -Petmoff /dev/ttyUSB0
38
39 or
40
41 fc-xram -h pirelli -Petmoff /dev/ttyUSB0 ramimage.srec rvinterf
42
43 etc
44
45 This -Petmoff option (implemented as part of our generic boot control framework,
46 see Target-boot-control article) tells loadtools programs to send an ETM ABB
47 write (abbw) command to the target serial port, issuing a DEVOFF write to the
48 VRPCDEV register, just before going into the loop that sends beacons aiming to
49 interrupt the boot process at the Calypso boot ROM. This trick works because
50 Pirelli's official fw implements a TI-standard RVTMUX interface on the Calypso
51 IrDA UART behind USB, complete with ETM, and with USB applying VCHG to Iota
52 VRPC, the DEVOFF operation (soft poweroff) turns into a deep reboot.
53
54 Running loadtools programs with -Petmoff against a Pirelli phone that is fully
55 booted, as opposed to "booted for charging only" state, is possible but not
56 recommended: it will forcibly kill the running firmware without any kind of
57 clean shutdown. Strictly speaking, this option always effects the just-
58 described forced firmware kill, no matter which state the official fw happens
59 to be in, but if the fw is in its "booted for charging only" state, then there
60 are no ill effects to be concerned with.
61
62 When fc-loadtool or fc-simint/fc-simtool finishes with a clean exit, or when a
63 RAM-based firmware session started with fc-xram is cleanly finished with
64 fc-shell poweroff, the phone returns to the same "booted for charging only"
65 state. Therefore, multiple operations of fc-loadtool, fc-simtool or fc-xram,
66 each with -Petmoff option, may be performed back to back, just like how a
67 FreeCalypso developer using a proper FC dev board would run back-to-back
68 sessions starting with -Pdtr or -Prts and ending with Iota poweroff.