17.5 Device Initialization
Initialization by the boot program follows the steps described below:
Stack setup.
- Embedded Flash Controller setup.
- External clock (crystal or external clock on XIN) detection.
- External crystal or clock with supported frequency supplied.
a. If yes, USB activation is allowed.
b. If no, USB activation is not allowed. The internal 12 MHz RC oscillator is used.
- Host clock switch to main oscillator.
- C variable initialization.
- PLLA setup: PLLA is initialized to generate a 48 MHz clock.
- Watchdog disable.
- Initialization of UART0 (115200 bauds, 8, N, 1).
- Initialization of the USB Device Port (only if USB activation is allowed; see Step 4.).
- Wait for one of the following events:
a. Check if USB device enumeration has occurred.
b. Check if characters have been received in UART0.
- Jump to SAM-BA Monitor (refer to 17.6 SAM-BA Monitor)