Project

General

Profile

ProductionFlashingV13 » History » Version 2

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

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