Device Initialization

Initialization by the boot program follows the steps described below:

Stack setup.

  1. 1.Embedded Flash Controller setup.
  2. 2.External clock (crystal or external clock on XIN) detection.
  3. 3.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.

  4. 4.Master clock switch to main oscillator.
  5. 5.C variable initialization.
  6. 6.PLLA setup: PLLA is initialized to generate a 48 MHz clock.
  7. 7.Watchdog disable.
  8. 8.Initialization of UART0 (115200 bauds, 8, N, 1).
  9. 9.Initialization of the USB Device Port (only if USB activation is allowed; see Step 4.).
  10. 10.Wait for one of the following events:

    a. Check if USB device enumeration has occurred.

    b. Check if characters have been received in UART0.

  11. 11.Jump to SAM-BA Monitor (refer to SAM-BA Monitor)