SAM-BA® In-System Programmer Target Console Serial Communications

Last modified by Microchip on 2024/06/20 12:44


The Target Console (also known as DEBUG, Device Console, Applet Console, or simply Console) is a serial communications port (generally a Universal Asynchronous Receiver Transmitter (UART)) on the target device that can communicate with a terminal emulation program on a host computer. It provides status information from operating systems, such as Linux®, and debug information from utility programs (see the "SAM-BA® In-System Programmer - Applets" page).

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

SAM-BA SAMA5D2 block diagram

As shown in the SAMA5D2 Series MPU block diagram, the UART is configured as the Target Console by the Boot Configuration Word. A serial-to-USB converter is generally needed for the USB port on a host computer to communicate with a two-wire UART of the target. On some evaluation kits, the serial-to-USB converter is on-board. This Target Console is also called the DEBUG port.

When the host computer is connected to the evaluation kit or separate serial-to-USB converter, the host computer will enumerate as a Communication Device Class (CDC). Take note of the USB port designation as it will be needed to configure the Terminal Emulation Program.

Note: For more information on connecting the target console serial port for the following evaluation kits, see:

Terminal Emulation Program

Download, install, and configure a Terminal Emulation program onto your host computer.

Serial Communications Port

Connect the host computer running the terminal emulation program to the target console serial communications port. The host computer will enumerate as a CDC. Take note of the USB port designation as it will be needed to configure the Terminal Emulation Program

Evaluation Kit

If you are using an evaluation kit, the user manual will identify the port used for the console. The -b, --board option will configure the SAM-BA host to communicate with the default console of the evaluation kit.

Custom Board

If you are developing with a custom board design, the Target Console can be configured by the Boot Configuration of the target device. In addition, the console can be set using the -d, --device <console_instance>:<console_ioset> option.

$ sam-ba -p serial -d sama5d2:help
Syntax: sama5d2:[<instance>]:[<ioset>]
instance - Serial console peripheral number
ioset - Serial console I/O set
sama5d2 - use default device/board settings
sama5d2:1:2 - use fully custom settings (peripheral number 1, I/O set 2)
sama5d2::2 - use default device/board settings but force use of I/O set 2
Peripheral numbers and I/O sets are device specific. Please see device documentation in 'doc' directory

Note: Supported console {<instance>, <ioset>} pairs are device specific; refer to the "Serial Console Configuration" section of the device configuration in the SAM-BA documentation: ../doc/devices.html

Applet Trace Level

Applet trace level verbosity can be controlled with the -t, --tracelevel  option. See the "SAM-BA In-System Programmer - Applets" page for more information.

What's Next?