Boot program, 1 description, 2 flow diagram – Rainbow Electronics AT91CAP9S250A User Manual

Page 73

Advertising
background image

73

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

14. Boot Program

14.1

Description

The Boot Program integrates different programs that manage download and/or upload into the
different memories of the product.

First, it initializes the Debug Unit serial port (DBGU) and the USB Device Port.

Then the DataFlash Boot program is executed. It looks for a sequence of seven valid ARM
exception vectors in a DataFlash connected to the SPI. All these vectors must be B-branch or
LDR load register instructions except for the sixth vector. This vector is used to store the size
of the image to download.

If a valid sequence is found, code is downloaded into the internal SRAM. This is followed by a
remap and a jump to the first address of the SRAM.

If no valid ARM vector sequence is found, NANDFlash Boot program is then executed. First, it
looks for a boot.bin file in the root directory or in the FIRMWARE directory of a FAT12/16 for-
matted NANDFlash. If such a file is found, code is downloaded into the internal SRAM. This is
followed by a remap and a jump to the first address of the SRAM.

If the NANDFlash is not formatted, the NANDFlash Boot program looks for a sequence of
seven valid ARM exception vectors. If such a sequence is found, code is downloaded into the
internal SRAM. This is followed by a remap and a jump to the first address of the SRAM.

If no valid ARM vector sequence is found, SAM-BA

Boot is then executed. It waits for trans-

actions either on the USB device, or on the DBGU serial port.

14.2

Flow Diagram

The Boot Program implements the algorithm in

Figure 14-1

.

Advertising