annotate doc/D-Sample @ 623:df3649549840

Leonardo target: targets/leonardo.{conf,h} created
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 22 Dec 2019 00:23:38 +0000
parents 0d66718e5f33
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
460
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Back In The Day TI had an official and well-supported platform for Calypso
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 software development; this platform was called D-Sample. It consisted of a
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 development board with the Calypso+Iota chipset on it (as well as a GSM RF
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 section based on their older Clara RF transceiver chip) plus an attached test
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 handset. Here are some pictures:
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 https://www.freecalypso.org/members/falcon/pictures/D-Sample/
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 I (Mychaela) have managed to obtain one of these historical D-Sample kits (the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 one pictured) back in 2015. Given that this D-Sample board was the original
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 and most native hw target for the TCS211 firmware program, and given that our
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 FreeCalypso Magnetite firmware project is essentially a resurrection and
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 continuation of that TCS211 fw program, I naturally have a strong desire to
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 have our firmware run on this board in its full glory like it once ran in the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 offices or cubicles of TI's own software engineers who worked on various parts
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 of TCS211 fw for the Calypso.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 The current state of support is that we have everything other than the GSM radio
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 working. We are currently unable to bring up the radio tract on the D-Sample
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 board with our own Magnetite fw because of Clara RF: we only got a stripped
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 semi-src version of TCS211 in which the *.c files for L1 were censored out and
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 only *.obj blobs were supplied instead; the latter blobs target Rita RF and not
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Clara. We have now successfully reconstructed the lost C sources for the RF-
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 independent and Rita-specific L1 modules, and we have l1_rf10.c for Clara RF
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 from the MV100 source fragments, but we are still missing the tpudrv10.c module
618
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
26 which is also required for Clara RF. The 20020917 fw image that came flashed
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
27 with this board does operate the RF hardware (tested and proven good with our
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
28 CMU200 instrument), and we have tried extracting the elusive tpudrv10 bits from
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
29 this original 20020917 fw. Our current tpudrv10.c driver is an attempt to
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
30 replicate what the original firmware appears to do, i.e., a translation of the
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
31 mystery logic from disassembly to C. But unfortunately it doesn't work, i.e.,
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
32 when we flash our Magnetite fw into the board, we get non-working RF: in the Rx
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
33 direction the Calypso DSP fails to receive the signal put out by the CMU200,
ed403a239ec6 doc/D-Sample: update for the failed attempt to reconstruct tpudrv10.c
Mychaela Falconia <falcon@freecalypso.org>
parents: 460
diff changeset
34 and in the Tx direction the CMU200 detects no signal put out by the MS.
460
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Despite having no working radio, everything else works: we can flash our own
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Magnetite fw images into the board with our fc-loadtool (fc-host-tools-r8 or
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 later; earlier versions did not support the 28F640W30B flash chip correctly),
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 the SIM interface works, the audio subsystem driven by the Calypso DSP driven
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 by our reconstructed TCS211 L1 works (can make beeps through the loudspeaker in
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 the handset part of the kit), the handset keypad works, and when we run a
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 firmware image built with the UI layers enabled, the 176x220 pixel color UI
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 shows up on the big LCD. Because the SIM interface works, one can play with
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 this UI a fair bit despite having no working GSM radio: the UI behaves the same
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 way as any regular phone would in the absence of coverage, so one can step
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 through the menus, read SIM phonebook entries and stored messages.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 Apparent hardware defect in our D-Sample LCD
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 ============================================
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 The one specific D-Sample board we have managed to score (might be the last one
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 left in the world, who knows) appears to be an early board: it is PCB rev 3,
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 but it has an early C05 version of the Calypso chip (F741979B), and it was made
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 some time in 2002. It came flashed with a firmware image built on 20020917,
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 and this original image it came with did not light up the LCD at all - it only
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 responded to AT commands. (Examination of that fw image suggests that it has
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 SMI instead of BMI+MFW, but I am not familiar with SMI at all - all I can tell
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 is that it behaves functionally as if it were an ACI build.) Thus the LCD part
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 of this D-Sample hardware only got exercised for the first time when I ran our
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 own Magnetite fw on it, and it exhibits some strange behaviour which I can only
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 attribute to a hardware problem.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 The symptom is that the picture on the LCD sometimes appears garbled, and
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 whether or not this LCD garbling happens (and if it does happen, how severely)
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 appears to depend on the picture content. Furthermore, the dependency is not
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 only on the picture content, but seemingly also on some law of chance, as the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 same picture can get garbled more or less severely at different times. Closer
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 examination of exactly how the picture is garbled reveals that the misbehaviour
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 appears to be some kind of double latching of write data inside the LCD module.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 The R2D driver maintains a software framebuffer in the r2d_lcd_memory_words[]
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 array, and the r2d_refresh() function transfers the picture in this software
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 FB to the hardware FB inside the LCD module by sequentially writing 176*220
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 16-bit words into a fixed ARM7 memory address in the nCS3 range, causing a
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 write cycle to be issued to the LCD module for each pixel. When a garbled
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 picture appears on the physical LCD, the picture maintained by the software in
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 the r2d_lcd_memory_words[] array is correct (not garbled) as revealed by
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 reading that array memory out via ETM memory read commands (see the tools in
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 the freecalypso-ui-dev repository), and the picture on the physical LCD is
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 garbled in such a way that it appears that at some point when the firmware sent
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 a single pixel to it, the LCD module erroneously registered a double write,
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 incrementing the internal FB RAM pointer by two pixels instead of one, with all
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 subsequent pixels shifted accordingly. The picture can be garbled more or less
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 severely depending on how many pixels in the picture trigger this apparent
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 double write effect.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 The end result is that even though we have a real TI-made D-Sample hardware kit,
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 its usefulness to us for FreeCalypso UI development is rather limited because
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 of both the lack of tpudrv10.c code resulting in no working GSM radio and the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 apparent hardware problem with the LCD module in the handset part of the kit.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 The Mother's plan is to design and build our own UI development board to take
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 the place of TI's D-Sample, combining the good version of the Calypso+Iota+Rita
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 chipset for which we have good fw support with a 176x220 pix color LCD of our
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 own - it is one of the industry standard sizes, so it should only be a matter
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 of getting a semi-custom one with the right interface (16-bit parallel) and the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 right polarizer orientation (6 o'clock viewing direction). The proposed board
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 would be a derivative of our current FCDEV3B, keeping the core Calypso+RF block
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 (originally from Openmoko) completely unchanged, but adding the LCD, the keypad
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 buttons and other handset peripherals, resulting in a Handset Motherboard
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 Prototype - HSMBP.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 Different Calypso silicon versions
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 ==================================
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 Because the D-Sample was a development board rather than a commercial end user
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 product, different D-Sample boards at different points in time had different
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 versions of the Calypso chip populated on them as the Calypso silicon itself
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 evolved. The board we got appears to be an early one, as it has Calypso chip
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 version F741979B on it (C05 rev B, DSP ROM version 3311), but I can only reason
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 that later D-Sample boards must have had Calypso C035 chips on them, either the
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 original Calypso C035 with DSP ROM version 3416 or the final silicon with DSP
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 ROM version 3606.
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 Because we only have one D-Sample board and we have no idea whether or not there
4d4f0bba9469 doc/D-Sample written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 are any other DS boards out there in the world (ours may well be the world's
621
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
117 last remaining unit), our dsample build target in FC Magnetite is set up for
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
118 Calypso chip version c05b by default, which is the version we got. If anyone
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
119 else in the world has another D-Sample board and it has a different Calypso
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
120 chip version on it, if you would like to run our FC Magnetite firmware on it,
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
121 you will need to follow the instructions in the Calypso-version-override
0d66718e5f33 Calypso chip version mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 618
diff changeset
122 article.