Datasheet

SAM9261 [DATASHEET]
Atmel-6062O-ATARM-SAM9261-Datasheet_21-Jun-16
80
12.5 Serial Flash Boot
The Serial Flash boot looks for a valid application in the SPI Serial Flash memory.
SPI0 is configured in mater mode to generate a SPCK at 8 MHz. Serial Flash shall be connected to NPCS0.
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 boots exits after a 1000 attempts.
If the serial flash is ready, Serial Flash boot reads the first 8 words into SRAM (Instruction code “Continuous 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.
Figure 12-6. Serial Flash Download
End
Read the first 8 instructions (0x0b).
Decode the sixth ARM vector
Yes
Read the Serial Flash into the internal SRAM.
(code size to read in vector 6)
Restore the reset value for the peripherals.
Set the PC to 0 and perform the REMAP
to jump to the downloaded application
Send status command (0x05)
8 vectors
(except vector 6) are LDR
or Branch instruction
Yes
Start
Is status OK?
Jump to next boot
solution
No
No