2.9.1.10 SAM-BA Monitor

This part of the ROM code is executed when no valid bootstrap is found in an external NVM during the boot sequence, and if the Monitor is not disabled in the Boot Configuration Packet.

The SAM-BA Monitor enables a serial communication link over either the USB Device peripheral or the ROM code console interface. It offers a set of simple commands to communicate with the chip using only a serial link controlled by an external device.

During the whole boot sequence, the Main RC oscillator is used as the main clock of the system. However, to use the USB Device interface, an accurate external clock must be supplied. Thus, before running the SAM-BA Monitor, the ROM code checks whether such an external clock is available. If a valid external clock or crystal is found, the UPLL is configured to allow communication on the USB Device link; otherwise, the USB Device interface is not activated and only the ROM code console is used for the SAM-BA Monitor.

SAM-BA Monitor steps:

  • Initialize the ROM code console interface.
  • Initialize the USB Device interface (if a valid external clock is available).
  • Enter a loop waiting for:
    • the USB device enumeration by an external host
    • a character reception on the ROM code console interface

Once the communication interface is identified, the application runs in an infinite loop waiting for different commands as listed in the table SAM-BA Monitor Commands.

Figure 2-25. SAM-BA Monitor