English
Language : 

AT91SAM9G20_1 Datasheet, PDF (78/832 Pages) ATMEL Corporation – AT91 ARM Thumb Microcontrollers
AT91SAM9G20 Preliminary
Figure 13-5. Structure of the ARM Vector 6
31
0
Size of the code to download in bytes
13.4.2.1
Example
An example of valid vectors follows:
00 ea000006 B
0x20
04 eafffffe B
0x04
08 ea00002f B
_main
0c eafffffe B
0x0c
10 eafffffe B
0x10
14 00001234 B
0x14 <- Code size = 4660 bytes
18 eafffffe B
0x18
The size of the image to load into SRAM is contained in the location of the sixth ARM vector.
Thus the user must replace this vector by the correct size of his/her application.
13.5 Serial Flash Boot
The Serial Flash boot looks for a valid application in the SPI Serial Flash memory.
SPI0 is configured in master mode to generate a SPCK at 8 MHz. Serial Flash shall be con-
nected to NPCS0 or NPCS1.
The Serial Flash boot reads the Serial Flash status register (Instruction code 0x05). The Serial
Flash is considered as ready if bit 0 of the returned status register is cleared.
If no Serial Flash is connected or if it does not answer, Serial Flash boot exits after 1000
attempts.
If the Serial Flash is ready, Serial Flash boot reads the first 8 words into SRAM (Instruction code
“Continuos read array” 0x0b) and checks if it corresponds to valid exception vectors according to
the Valid Image detection algorithm.
If a valid application is found, this application is loaded into internal SRAM and executed by
branching at address 0x0000_0000 after remap. This application may be the application code or
a second-level bootloader.
78
6384D–ATARM–04-May-09