SAM-BA® ISP - SAM-BA Monitor


The SAM-BA® Monitor program performs basic internal memory read, write, and execute commands. It is embedded in the ROM Boot Code of the target device (Microchip Technology Arm®-based MPU or MCU). The SAM-BA Monitor is controlled by and communicates with the SAM-BA Host over a serial communications link. For additional information, refer to the SAM-BA Host to Monitor Serial Communications topic.

The SAM-BA Host to Monitor Serial Communications link is a dedicated serial port separate from the Target Console serial communications.

Boot Process Overview (SAMA5D2 Series MPUs)

The following describes the boot process for a SAMA5D2 Series MPU from RESET to the execution of the SAM-BA Monitor. This is the first-stage bootloader that is resident in the internal ROM of the device, known as the ROM Boot Code.

Operation of the SAM-BA Monitor is specific to the target device. Refer to the device data sheet for more details.


The Boot Process for a device begins with a Processor Reset followed by the execution of the ROM Boot Code, also known as the Stage One Bootloader. The ROM Boot Code will:

  • Configure external memories
  • Configure the UART port used as a terminal console
  • Initialize master clock
  • If external memory is available and valid code is detected, read contents to SRAM

If external memory is not available, or no valid code is detected, and the SAM-BA Monitor has not been disabled, the ROM Boot Code will begin the execution of the SAM-BA Monitor.


The first step of the SAM-BA Monitor is to detect if there is an external 12 MHz clock signal or if there is an external quartz crystal resonator connected to the 12 MHz Crystal Oscillator.

  • If there is, then the SAM-BA Monitor will configure the Clock Generator to supply the Main Clock signal from this source.
  • If there is not, then the SAM-BA Monitor will configure the Clock Generator to supply the Main Clock signal from the internal 12 MHz RC Oscillator.

Next, the SAM-BA Monitor will initialize the Universal Asynchronous Receiver Transmitter (UART) pins specified in the Boot Configuration Word (UART_CONSOLE) and, if the source of the Main Clock signal is from an external 12 MHz clock signal or the 12 MHz Crystal Oscillator, it will initialize the USB High-Speed Device Port (UDPHS).

The UART will be initialized for: 115,200 baud, eight bits of data, no parity, and one stop bit.

The USB Device Port will communicate using the Communication Device Class (CDC).

SAM-BA Monitor will print RomBOOT to the Target Console.


The SAM-BA Monitor will check if the USB Device Port has enumerated, indicating there are serial communications available, and wait for a command.

If the USB Device Port has not enumerated, it will check if characters are received on the Target Console. If characters are received, the SAM-BA Monitor will continue communicating through the UART and wait for further commands.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.