Datasheet
133
6120F–ATARM–03-Oct-06
AT91SAM7X512/256/128 Preliminary
21. AT91SAM Boot Program
21.1 Overview
The Boot Program integrates different programs permitting download and/or upload into the dif-
ferent memories of the product.
First, it initializes the Debug Unit serial port (DBGU) and the USB Device Port.
SAM-BA
™
Boot is then executed. It waits for transactions either on the USB device, or on the
DBGU serial port.
21.2 Flow Diagram
The Boot Program implements the algorithm in Figure 21-1.
Figure 21-1. Boot Program Algorithm Flow Diagram
21.3 Device Initialization
Initialization follows the steps described below:
1. FIQ initialization
1. Stack setup for ARM supervisor mode
2. Setup the Embedded Flash Controller
3. External Clock detection
4. Main oscillator frequency detection if no external clock detected
5. Switch Master Clock on Main Oscillator
6. Copy code into SRAM
7. C variable initialization
8. PLL setup: PLL is initialized to generate a 48 MHz clock necessary to use the USB
Device
9. Disable of the Watchdog and enable of the user reset
10. Initialization of the USB Device Port
11. Jump to SAM-BA Boot sequence (see ”SAM-BA Boot” on page 134)
Device
Setup
AutoBaudrate
Sequence Successful ?
Run SAM-BA Boot
Run SAM-BA Boot
USB Enumeration
Successful ?
Yes Yes
No
No