doc: Update all docs to 1.9. Note this in doc/RELNOTES
[fw/altos] / doc / updating-firmware.inc
1 [appendix]
2 == Updating Device Firmware
3
4         ifdef::telemega[]
5         TeleMega, TeleMetrum v2, EasyMega, EasyMini and TeleDongle v3
6         are all
7         endif::telemega[]
8         ifndef::telemega[]
9         EasyMini is
10         endif::telemega[]
11         programmed directly over their USB connectors (self
12         programming).
13         ifdef::telemega[]
14         TeleMetrum v1, TeleMini v1.0 and TeleDongle v0.2 are
15         all programmed by using another device as a programmer (pair
16         programming). It's important to recognize which kind of devices
17         you have before trying to reprogram them.
18         endif::telemega[]
19
20         You may wish to begin by ensuring you have current firmware
21         images.  These are distributed as part of the AltOS software
22         bundle that also includes the AltosUI ground station program.
23         Newer ground station versions typically work fine with older
24         firmware versions, so you don't need to update your devices
25         just to try out new software features.  You can always
26         download the most recent version from
27         http://www.altusmetrum.org/AltOS/
28
29         ifdef::telemega[]
30
31         === Updating TeleMega, TeleMetrum v2, EasyMega, EasyMini or TeleDongle v3 Firmware
32
33         endif::telemega[]
34         ifndef::telemega[]
35
36         === Updating EasyMini Firmware
37
38         endif::telemega[]
39
40                 Self-programmable devices are reprogrammed by
41                 connecting them to your computer over USB.
42
43                 . Attach a battery if necessary and power switch to
44                   the target device. Power up the device.
45
46                 . Using a Micro USB cable, connect the target device to your
47                   computer's USB socket.
48
49                 . Run AltosUI, and select 'Flash Image' from the File menu.
50
51                 . Select the target device in the Device Selection dialog.
52
53                 . Select the image you want to flash to the device,
54                   which should have a name in the form
55                   <product>-v<product-version>-<software-version>.ihx,
56                   such as EasyMini-v1.0-1.6.0.ihx.
57
58                 . Make sure the configuration parameters are
59                   reasonable looking. If the serial number and/or RF
60                   configuration values aren't right, you'll need to
61                   change them.
62
63                 . Hit the 'OK' button and the software should proceed
64                   to flash the device with new firmware, showing a
65                   progress bar.
66
67                 . Verify that the device is working by using the
68                   'Configure Altimeter' or 'Configure Groundstation'
69                   item to check over the configuration.
70
71                 ==== Recovering From Self-Flashing Failure
72
73                         If the firmware loading fails, it can leave the device
74                         unable to boot. Not to worry, you can force the device to
75                         start the boot loader instead, which will let you try to
76                         flash the device again.
77
78                         On each device, connecting two pins from one of the exposed
79                         connectors will force the boot loader to start, even if the
80                         regular operating system has been corrupted in some way.
81
82                         ifdef::telemega[]
83                         TeleMega::
84
85                         Connect pin 6 and pin 1 of the companion
86                         connector. Pin 1 can be identified by the square pad
87                         around it, and then the pins could sequentially across
88                         the board. Be very careful to *not* short pin 8 to
89                         anything as that is connected directly to the
90                         battery. Pin 7 carries 3.3V and the board will crash
91                         if that is connected to pin 1, but shouldn't damage
92                         the board.
93                         endif::telemega[]
94
95                         ifdef::easymega[]
96                         EasyMega::
97
98                         Connect pin 6 and pin 1 of the companion
99                         connector. Pin 1 can be identified by the square pad
100                         around it, and then the pins could sequentially across
101                         the board. Be very careful to *not* short pin 8 to
102                         anything as that is connected directly to the
103                         battery. Pin 7 carries 3.3V and the board will crash
104                         if that is connected to pin 1, but shouldn't damage
105                         the board.
106                         endif::easymega[]
107
108                         ifdef::telemetrum[]
109                         TeleMetrum v2::
110
111                         Connect pin 6 and pin 1 of the companion
112                         connector. Pin 1 can be identified by the square pad
113                         around it, and then the pins could sequentially across
114                         the board. Be very careful to *not* short pin 8 to
115                         anything as that is connected directly to the
116                         battery. Pin 7 carries 3.3V and the board will crash
117                         if that is connected to pin 1, but shouldn't damage
118                         the board.
119                         endif::telemetrum[]
120
121                         ifdef::easymini[]
122                         EasyMini::
123
124                         Connect pin 6 and pin 1 of the debug connector, which
125                         is the six holes next to the beeper. Pin 1 can be
126                         identified by the square pad around it, and then the
127                         pins could sequentially across the board, making Pin 6
128                         the one on the other end of the row.
129                         endif::easymini[]
130
131                         ifdef::telemetrum[]
132                         TeleDongle v3::
133
134                         Connect pin 32 on the CPU to ground. Pin 32 is closest
135                         to the USB wires on the row of pins towards the center
136                         of the board. Ground is available on the capacitor
137                         next to it, on the end towards the USB wires.
138                         
139                         TeleBT v4::
140
141                         Connect pin 30 on the CPU to ground. Pin 30 is the 6th
142                         pin from the right on the top when the unit is oriented
143                         such that the SMA is at the top.
144                         endif::telemetrum[]
145
146                         Once you've located the right pins:
147
148                         . Turn the altimeter power off.
149
150                         . Connect a battery.
151
152                         . Connect the indicated terminals together with a
153                           short piece of wire. Take care not to accidentally
154                           connect anything else.
155
156                         . Connect USB
157
158                         . Turn the board power on.
159
160                         The board should now be visible over USB as
161                         'AltosFlash' and be ready to receive firmware.  Once
162                         the board has been powered up, you can remove the
163                         piece of wire.
164
165         ifdef::telemetrum,telemini[]
166         === Pair Programming
167
168                 The big concept to understand is that you have to use
169                 a TeleMetrum v1.0, TeleBT v1.0 or TeleDongle v0.2 as a
170                 programmer to update a pair programmed device. Due to
171                 limited memory resources in the cc1111, we don't
172                 support programming directly over USB for these
173                 devices.
174
175                 If you need to update the firmware on a TeleDongle
176                 v0.2, we recommend updating the altimeter first,
177                 before updating TeleDongle.  However, note that
178                 TeleDongle rarely need to be updated.  Any firmware
179                 version 1.0.1 or later will work, version 1.2.1 may
180                 have improved receiver performance slightly.
181
182                 ==== Updating TeleMetrum v1.x Firmware
183
184                         . Find the 'programming cable' that you got as
185                           part of the starter kit, that has a red
186                           8-pin MicroMaTch connector on one end and a
187                           red 4-pin MicroMaTch connector on the other
188                           end.
189
190                         . Take the 2 screws out of the TeleDongle v0.2
191                           or TeleBT v1.0 case to get access to the
192                           circuit board.
193
194                         . Plug the 8-pin end of the programming cable
195                           to the matching connector on the TeleDongle
196                           v0.2 or TeleBT v1.0, and the 4-pin end to
197                           the matching connector on the TeleMetrum.
198                           Note that each MicroMaTch connector has an
199                           alignment pin that goes through a hole in
200                           the PC board when you have the cable
201                           oriented correctly.
202
203                         . Attach a battery to the TeleMetrum board.
204
205                         . Plug the TeleDongle v0.2 or TeleBT v1.0 into
206                           your computer's USB port, and power up the
207                           TeleMetrum.
208
209                         . Run AltosUI, and select 'Flash Image' from
210                           the File menu.
211
212                         . Pick the TeleDongle v0.2 or TeleBT v1.0
213                           device from the list, identifying it as the
214                           programming device.
215
216                         . Select the image you want put on the
217                           TeleMetrum, which should have a name in the
218                           form telemetrum-v1.2-1.0.0.ihx.  It should
219                           be visible in the default directory, if not
220                           you may have to poke around your system to
221                           find it.
222
223                         . Make sure the configuration parameters are
224                           reasonable looking. If the serial number
225                           and/or RF configuration values aren't right,
226                           you'll need to change them.
227
228                         . Hit the 'OK' button and the software should
229                           proceed to flash the TeleMetrum with new
230                           firmware, showing a progress bar.
231
232                         . Confirm that the TeleMetrum board seems to
233                           have updated OK, which you can do by
234                           plugging in to it over USB and using a
235                           terminal program to connect to the board and
236                           issue the 'v' command to check the version,
237                           etc.
238
239                         If something goes wrong, give it another try.
240
241                 ==== Updating TeleMini v1.0 Firmware
242
243                         You'll need a special 'programming cable' to
244                         reprogram the TeleMini v1.0.  You can make your own
245                         using an 8-pin MicroMaTch connector on one end
246                         and a set of four pins on the other.
247
248                         . Take the 2 screws out of the TeleDongle v0.2
249                           or TeleBT v1.0 case to get access to the
250                           circuit board.
251
252                         . Plug the 8-pin end of the programming cable
253                           to the matching connector on the TeleDongle
254                           v0.2 or TeleBT v1.0, and the 4-pins into the
255                           holes in the TeleMini v1.0 circuit board.  Note
256                           that the MicroMaTch connector has an
257                           alignment pin that goes through a hole in
258                           the PC board when you have the cable
259                           oriented correctly, and that pin 1 on the
260                           TeleMini v1.0 board is marked with a square pad
261                           while the other pins have round pads.
262
263                         . Attach a battery to the TeleMini v1.0 board.
264
265                         . Plug the TeleDongle v0.2 or TeleBT v1.0 into
266                           your computer's USB port, and power up the
267                           TeleMini v1.0
268
269                         . Run AltosUI, and select 'Flash Image' from
270                           the File menu.
271
272                         . Pick the TeleDongle v0.2 or TeleBT v1.0
273                           device from the list, identifying it as the
274                           programming device.
275
276                         . Select the image you want put on the
277                           TeleMini v1.0, which should have a name in the
278                           form telemini-v1.0-1.0.0.ihx.  It should be
279                           visible in the default directory, if not you
280                           may have to poke around your system to find
281                           it.
282
283                         . Make sure the configuration parameters are
284                           reasonable looking. If the serial number
285                           and/or RF configuration values aren't right,
286                           you'll need to change them.
287
288                         . Hit the 'OK' button and the software should
289                           proceed to flash the TeleMini v1.0 with new
290                           firmware, showing a progress bar.
291
292                         . Confirm that the TeleMini v1.0 board seems to
293                           have updated OK, which you can do by
294                           configuring it over the radio link through
295                           the TeleDongle, or letting it come up in
296                           “flight” mode and listening for telemetry.
297
298                         If something goes wrong, give it another try.
299
300                 ==== Updating TeleDongle v0.2 Firmware
301
302                 Updating TeleDongle v0.2 firmware is just like
303                 updating TeleMetrum v1.x or TeleMini v1.0 firmware, but you
304                 use either a TeleMetrum v1.x, TeleDongle v0.2 or
305                 TeleBT v1.0 as the programmer.
306
307                 . Find the 'programming cable' that you got as part of
308                   the starter kit, that has a red 8-pin MicroMaTch
309                   connector on one end and a red 4-pin MicroMaTch
310                   connector on the other end.
311
312                 . Find the USB cable that you got as part of the
313                   starter kit, and plug the “mini” end in to the
314                   mating connector on TeleMetrum v1.x, TeleDongle v0.2
315                   or TeleBT v1.0.
316
317                 . Take the 2 screws out of the TeleDongle v0.2 or
318                   TeleBT v1.0 case to get access to the circuit board.
319
320                 . Plug the 8-pin end of the programming cable to the
321                   matching connector on the programmer, and the 4-pin
322                   end to the matching connector on the TeleDongle
323                   v0.2.  Note that each MicroMaTch connector has an
324                   alignment pin that goes through a hole in the PC
325                   board when you have the cable oriented correctly.
326
327                 . Attach a battery to the TeleMetrum v1.x board if
328                   you're using one.
329
330                 . Plug both the programmer and the TeleDongle into
331                   your computer's USB ports, and power up the
332                   programmer.
333
334                 . Run AltosUI, and select 'Flash Image' from the File
335                   menu.
336
337                 . Pick the programmer device from the list,
338                   identifying it as the programming device.
339
340
341                 . Select the image you want put on the TeleDongle
342                   v0.2, which should have a name in the form
343                   teledongle-v0.2-1.0.0.ihx.  It should be visible in
344                   the default directory, if not you may have to poke
345                   around your system to find it.
346
347                 . Make sure the configuration parameters are
348                   reasonable looking. If the serial number and/or RF
349                   configuration values aren't right, you'll need to
350                   change them.  The TeleDongle v0.2 serial number is
351                   on the “bottom” of the circuit board, and can
352                   usually be read through the translucent blue plastic
353                   case without needing to remove the board from the
354                   case.
355
356                 . Hit the 'OK' button and the software should proceed
357                   to flash the TeleDongle v0.2 with new firmware,
358                   showing a progress bar.
359
360                 . Confirm that the TeleDongle v0.2 board seems to have
361                   updated OK, which you can do by plugging in to it
362                   over USB and using a terminal program to connect to
363                   the board and issue the 'v' command to check the
364                   version, etc.  Once you're happy, remove the
365                   programming cable and put the cover back on the
366                   TeleDongle v0.2.
367
368                 If something goes wrong, give it another try.
369
370                 Be careful removing the programming cable from the
371                 locking 8-pin connector on TeleMetrum.  You'll need a
372                 fingernail or perhaps a thin screwdriver or knife
373                 blade to gently pry the locking ears out slightly to
374                 extract the connector.  We used a locking connector on
375                 TeleMetrum to help ensure that the cabling to
376                 companion boards used in a rocket don't ever come
377                 loose accidentally in flight.
378         endif::telemetrum,telemini[]