SAM9X60-EK Evaluation Kit - Console Serial Communications
Contents
- Introduction
- Prerequisites
- J-Link CDC Serial Port (J22)
- UART Debug Port (J24)
- Terminal Emulation Program
- Connecting Host to Target
- Serial Communication Established
- Booting a Linux Image
- Summary
- Learn More
Introduction
In this training topic, you will learn how to connect a host computer running a terminal emulation program to the SAM9X60-EK Evaluation Kit to access the target console.
There are two methods to access the target console:
- J-Link CDC serial port (J22)
- UART Debug port (J24)
The target console (also known as DEBUG, Target Console, Applet Console, or simply Console) is a serial communications port (generally a UART) on the target device that communicates with a terminal emulation program on a host computer. It provides status information from operating systems, such as Linux® boot log, and debug information from utility programs, for example, from SAM-BA Applets.
These are the steps to establish serial communication between the host and the target:
- Choose one of the two ports available for serial communication: J-Link CDC port (J22) or UART Debug port (J24).
- Choose a terminal emulation program for your host computer and configure it.
- Connect the host computer to the target.
- Observe RomBOOT on the screen. Serial communication is established.
Prerequisites
- Familiarity with the features of the SAM9X60-EK evaluation kit.
J-Link CDC Serial Port (J22)
The J-Link CDC serial port (J22) of the SAM9X60 evaluation kit provides a debugging interface using the SEGGER J-Link-OnBoard debugger. Microcontroller U27 provides a JTAG interface to the debugger.
When the J-Link debugger is not in use, microcontroller U27 provides USB CDC class serial communications between the SAM9X60-EK UART and Micro-B USB connector J22.
When the host computer is connected to J22 of the evaluation kit, the SAM9X60-EK will enumerate as a CDC class device. A terminal emulation program running on a host computer provides a user interface to interact with the target console.
UART Debug Port (J24)
The SAM9X60 evaluation kit features a dedicated serial port for debugging. This is accessible through the debug header J24. Various interfaces can be used such as FTDI TTL-232-R USB-to-TTL serial cable.
The J24 header is a 6-pin male header suitable for FTDI-based cables.
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).
Port J22
When connecting a USB Micro-B connecter to port J22, 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
Port J24
When connecting a USB-FTDI cable to port J24, look for USB Serial Port (COM) 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
You can install minicom and putty from the command line. $ sudo apt-get install putty
You will need to set:
- Baud: 115200
- Data Bits: 8
- Parity: None
- Stop Bits: 1
To find the USB port, execute dmesg on the command line:
Port 22
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
Port 24
usb 1-3: New USB device found, idVendor=0403, idProduct=6001
usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: TTL232R-3V3
usb 1-3: Manufacturer: FTDI
usb 1-3: SerialNumber: FTFXZ39X
ftdi_sio 1-3:1.0: FTDI USB Serial Device converter detected
usb 1-3: Detected FT232RL
usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
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 to Port J22
Power up the evaluation kit by connecting a 5VDC external power supply to J1 -or- you can apply power by connecting a micro USB cable to J7. Connect the host PC to the J-Link CDC serial port (J22) using a USB Micro-B connector. The host PC will enumerate as a CDC Class device.
Connect to Port J24
Power up the evaluation kit by connecting a 5 VDC external power supply to J1 -or- you can apply power by connecting a micro USB cable to J7. Connect the host PC to the Serial UART Debug port J24 using an FTDI-based cable.
Serial Communication Established
Once you connect the Host PC to your target, open the terminal emulation program with its serial settings configured. Press the Reset Button (SW3) on the SAM9X60-EK.
On the terminal emulation screen, you will see RomBOOT indicating the first-stage bootloader did not find an image to load and the SAM-BA Monitor is running and awaiting a command.
Booting a Linux Image
The J-Link CDC or UART Debug serial port is used as the Linux Console when booting a Linux Image. For more information, see the following topics:
Summary
The J-Link CDC and UART Debug serial ports are serial communications ports for the Target Console. 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). This facilitates users in programming and debugging.
Learn More
- SAM9X60-EK Evaluation Kit - Booting Demo Linux Image
- SAM9X60-EK Evaluation Kit - Fast Boot Demonstration
- SAM9X60-EK Evaluation Kit - Booting from SD Memory Card
- SAM9X60-EK Evaluation Kit - Booting from NAND Flash Memory
- SAM9X60-EK Evaluation Kit - Booting from NOR Flash (QSPI) Memory
- SAM9X60-EK Evaluation Kit - Attaching TM5000 WVGA Display