Atmel ARM-Based Evaluation Kit AT91SAM9N12-EK AT91SAM9N12-EK Data Sheet

Product codes
AT91SAM9N12-EK
Page of 1104
92
SAM9N12/SAM9CN11/SAM9CN12 [DATASHEET]
11063K–ATARM–05-Nov-13
12.2.4.2 NVM Bootloader Program Description
Figure 12-3.  NVM Bootloader Program Diagram
The NVM bootloader program first initializes the PIOs related to the NVM device. Then it configures the right peripheral
depending on the NVM and tries to access this memory. If the initialization fails, it restores the reset values for the PIO
and the peripheral and then tries the same operations on the next NVM of the sequence.
If the initialization is successful, the NVM bootloader program reads the beginning of the NVM and determines if the NVM
contains valid code.
If the NVM does not contain valid code, the NVM bootloader program restores the reset value for the peripherals and
then tries the same operations on the next NVM of the sequence.
End
Valid code detection in NVM
Yes
Copy the valid code 
from external NVM to internal SRAM.
Restore the reset values for the peripherals.
Perform the REMAP and set the PC to 0  
to jump to the downloaded application
Initialize NVM
NVM contains valid code
Yes
Start
Initialization OK ?
Restore the reset values
for the peripherals and 
Jump to next boot solution
No
No