Project

General

Profile

ProductionFlashingV13 » History » Version 3

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

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