Introduction
In this topic, you will learn how to connect a host computer running a terminal emulation program to the ATSAMA5D27-SOM1-EK1 evaluation kit J-Link Communication Device Class (CDC) serial port to access the Console.
The Console (also known as DEBUG, Device Console, Target Console, Applet Console, or simply Console) is a serial communications port (generally a Universal Asynchronous Receiver Transmitter (UART)) on the target device (thus the term Target Console or Device Console) that communicates with a terminal emulation program on a host computer. It provides status information from an operating system, such as the Linux® boot log, and debug information from utility programs, for example, from SAM-BA® Applets.
Prerequisites
Familiarity with the features of the ATSAMA5D27-SOM1-EK1 evaluation kit.
J-Link CDC Serial Port
The J-Link CDC serial port (J10) of the ATSAMA5D27-SOM1-EK1 evaluation kit provides a debugging interface using a SEGGER J-Link-OnBoard debugger. Microcontroller U4 and support circuitry provide a JTAG interface to the debugger.
When the J-Link debugger is not in use, microcontroller U4 provides USB CDC serial communications between the ATSAMA5D27-SOM1 UART and micro-B USB connector J10.
Configuration of the SAMA5D27 UART as the Target Console is performed by the UART_CONSOLE bits in the Boot Configuration Word. By default, UART_CONSOLE = 0b00 configures UART1 IOSET1 (pins PD2 and PD3) as the Target Console.
When the host computer is connected to J10 of the evaluation kit, the ATSAMA5D27-SOM1-EK1 will enumerate as a CDC. A terminal emulation program running on a host computer provides a user interface to interact with the target console.
Take note of the USB COM port assigned as it will be needed to configure the Terminal Emulation Program.
Terminal Emulation Program
Download, install, and configure a Terminal Emulation program onto your host computer. There are several choices for terminal programs. Below is a list of popular programs. Many are free to download and a few are included with the operating system or distributions.
Windows®
To locate the COM port, open the Windows Device Manager and expand Ports (COM & LPT). Look for JLink CDC UART Port and note the COM port number. You will use this to configure the terminal emulator. You will also need to set:
- Baud: 115200
- Data Bits: 8
- Parity: None
- Stop Bits: 1
macOS®
- Screen
- Find the serial port: $ ls /dev/tty.*
- To run: $ screen /dev/tty.usbmodemFD121 115200
- To quit: $ Control-a $ Control-\
- Minicom
- Perform an Internet search: “minicom for macOS”
- Serial
- Available from the Apple App Store
- CoolTerm
To local the serial port, you can open the CoolTerm application and note the available ports that are available in the Port selection. You will also need to set:
- Baud: 115200
- Data Bits: 8
- Parity: None
- Stop Bits: 1
Linux
- Minicom
- PuTTY
- Perform an Internet search: ”putty for linux”
To find the USB port, execute dmesg on the command line:
$ dmesg
usb 3-1: New USB device found, idVendor=1366, idProduct=0105
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: J-Link
usb 3-1: Manufacturer: SEGGER
usb 3-1: SerialNumber: 000483029459
cdc_acm 3-1:1.0: ttyACM0: USB ACM device
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Note the USB port with the Product ID of J-Link. The device will be enumerated as a USB ACM device.
Connecting Host to Target
Connect the host PC to the J-Link CDC serial port (J10) using a USB Micro-B connector. The host PC will enumerate as a CDC.
If there is no SD Memory Card installed, the J-Link Onboard LED will flash green and the RGB LED will flash red.
On the terminal emulation screen, you will see RomBOOT indicating the first-stage bootloader did not find an image to execute, and the SAM-BA Monitor is running and awaiting a command.
Booting a Linux Image
The J-Link CDC serial port is used as the Linux Console when booting a Linux Image. For more information, see the following topics:
SAM-BA In-System Programmer
The J-Link CDC serial port is used as an Applet Console to the SAM-BA In-System Programmer.
Summary
The J-Link CDC serial port is a communications port to the target device UART which has been configured as the Console by the Boot Configuration Word. The serial port communicates with a host computer running a terminal emulation program. The Console provides status information from operating systems, such as Linux, and debug information from utility programs (for example, from SAM-BA Applets).
Related topics: