Project

General

Profile

ProductionFlashingV13 » History » Version 2

tsaitgaist, 02/19/2016 10:48 PM
add picture and firmware

1 1 laforge
2 1 laforge
== Production Flashing v1.3 ==
3 1 laforge
4 1 laforge
Unfortunately, v1.3 has a bug in the design, which requires a specific PCB trace to be cut before it can be used.  The idea of that PCB trace was to
5 1 laforge
pull one formerly unised GPIO to GND, permitting software to detect it is running on a v1.3 harware (As opposed to v1.2 or earlier).
6 1 laforge
7 1 laforge
Instead, we need to store the hardware version in an OTP region of the SPI flash.
8 1 laforge
9 2 tsaitgaist
So After that trace has been cut, the following steps need to be performed (with following [attachment:simtrace_v13_fw.tar.bz2 firmware]):
10 2 tsaitgaist
11 2 tsaitgaist
[[Image(simtrace_v13_cut.jpg, 33%)]]
12 1 laforge
13 1 laforge
1. put the rom loader into the flash, using the TEST jumper
14 1 laforge
1. use the sam7 utility to install the main_factory.samba file (containing sam7dfu and main_factory.bin)
15 1 laforge
{{{
16 1 laforge
$ sam7 -l /dev/ttyACM0 --exec set_clock --exec unlock_regions --exec "flash ./main_factory.samba"
17 1 laforge
Chip Version: 2
18 1 laforge
Embedded Processor: ARM7TDMI
19 1 laforge
NVRAM Region 1 Size: 128 K
20 1 laforge
NVRAM Region 2 Size: 0 K
21 1 laforge
SRAM Size: 32 K
22 1 laforge
Series: AT91SAM7Sxx
23 1 laforge
Page Size: 256 bytes
24 1 laforge
Lock Regions: 8
25 1 laforge
warning: magic read 0x00200000 != 0x13
26 1 laforge
warning: magic read 0x00200000 != 0x13
27 1 laforge
}}}
28 1 laforge
1. attach a serial cable to the board and press the reset button, generating the following output:
29 1 laforge
{{{
30 1 laforge
(C) 2006-2011 by Harald Welte <hwelte@hmw-consulting.de>
31 1 laforge
This software is FREE SOFTWARE licensed under GNU GPL
32 1 laforge
Version 0.5.7-6d5f-dirty compiled 20131117-202832 by laforge@radha.de.gnumonks.org
33 1 laforge
34 1 laforge
35 1 laforge
DEBUG Interface:
36 1 laforge
0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) Toggle LED2
37 1 laforge
9) Reset
38 1 laforge
RSTC_SR=0x00010000
39 1 laforge
                  Inititalizing usbcmd_gen_init
40 1 laforge
                                               udp_open(437): entering
41 1 laforge
spiflash_init
42 1 laforge
spi_transceive: enter(tx_len=4) leave(): 0x01 0x02 0x15 0x4d 
43 1 laforge
SPI ID: 01 02 15
44 1 laforge
}}}
45 1 laforge
1. entering the 'p' key to program the v1.3 into OTP
46 1 laforge
1. entering the 'P' key to verify / generate the following output:
47 1 laforge
{{{
48 1 laforge
spi_transceive: enter(tx_len=5) leave(): 0xce 0x5a 0x07 0x51 0x00 0x00 0x00 0x00 0x00 0x03 0x01 0x00 0x00 0x00 0x00 0x00 
49 1 laforge
OTP READ(0x114): ce 5a 07 51 00 00 00 00 00 03 01 00 00 00 00 00 
50 1 laforge
Version: 0x00010300
51 1 laforge
}}}
52 1 laforge
1. using dfu-util to overwrite main_factory with main_simtrace:
53 1 laforge
{{{
54 1 laforge
$ dfu-util -a 0 -D ./main_simtrace.bin -R
55 1 laforge
dfu-util 0.5
56 1 laforge
57 1 laforge
(C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
58 1 laforge
(C) 2010-2011 Tormod Volden (DfuSe support)
59 1 laforge
This program is Free Software and has ABSOLUTELY NO WARRANTY
60 1 laforge
61 1 laforge
dfu-util does currently only support DFU version 1.0
62 1 laforge
63 1 laforge
Opening DFU capable USB device... ID 16c0:0762
64 1 laforge
WARNING: Can not find cached DFU functional descriptor
65 1 laforge
Warning: Assuming DFU version 1.0
66 1 laforge
Run-time device DFU version 0100
67 1 laforge
Claiming USB DFU Runtime Interface...
68 1 laforge
Determining device status: state = appIDLE, status = 0
69 1 laforge
Device really in Runtime Mode, send DFU detach request...
70 1 laforge
Resetting USB...
71 1 laforge
Opening DFU USB Device...
72 1 laforge
Found DFU: [16c0:0762] devnum=0, cfg=1, intf=0, alt=0, name="SimTrace DFU Interface - Application Partition"
73 1 laforge
Claiming USB DFU Interface...
74 1 laforge
Setting Alternate Setting #0 ...
75 1 laforge
Determining device status: state = dfuIDLE, status = 0
76 1 laforge
dfuIDLE, continuing
77 1 laforge
DFU mode device DFU version 0100
78 1 laforge
Device returned transfer size 256
79 1 laforge
No valid DFU suffix signature
80 1 laforge
Warning: File has no DFU suffix
81 1 laforge
bytes_per_hash=415
82 1 laforge
Copying data from PC to DFU device
83 1 laforge
Starting download: [##################################################] finished!
84 1 laforge
state(7) = dfuMANIFEST, status(0) = No error condition is present
85 1 laforge
state(2) = dfuIDLE, status(0) = No error condition is present
86 1 laforge
Done!
87 1 laforge
can't detach
88 1 laforge
Resetting USB to switch back to runtime mode
89 1 laforge
}}}
90 1 laforge
1. observing the serial output of the regular firmware starting:
91 1 laforge
{{{
92 1 laforge
sam7dfu: switching to APP mode´┐Ż
93 1 laforge
(C) 2006-2011 by Harald Welte <hwelte@hmw-consulting.de>
94 1 laforge
This software is FREE SOFTWARE licensed under GNU GPL
95 1 laforge
Version 0.5.6-bb28 compiled 20131117-201527 by laforge@radha.de.gnumonks.org
96 1 laforge
97 1 laforge
98 1 laforge
DEBUG Interface:
99 1 laforge
0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) Toggle LED2
100 1 laforge
9) Reset
101 1 laforge
RSTC_SR=0x00010300
102 1 laforge
                  Inititalizing usbcmd_gen_init
103 1 laforge
                                               udp_open(437): entering
104 1 laforge
USART Initializing
105 1 laforge
pio_irq_register(109): registering handler 00107538 for PIOA 7
106 1 laforge
RST
107 1 laforge
computed Fi(1) Di(1) ratio: 372
108 1 laforge
ISO_SW Initializing
109 1 laforge
pio_irq_register(109): registering handler 001079cc for PIOA 8
110 1 laforge
pio_irq_register(109): registering handler 001078c0 for PIOA 25
111 1 laforge
VCC_PHONE off
112 1 laforge
USART Entering Rx Mode
113 1 laforge
RST
114 1 laforge
computed Fi(1) Di(1) ratio: 372
115 1 laforge
MODE: SNIFFER
116 1 laforge
117 1 laforge
RST
118 1 laforge
computed Fi(1) Di(1) ratio: 372
119 1 laforge
main(76): entering main (idle) loop
120 1 laforge
}}}
Add picture from clipboard (Maximum size: 48.8 MB)