SAM9X60-EK Evaluation Kit - Console Serial Communications

Last modified by Microchip on 2023/11/16 19:27

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.

Unfortunately, the SAM9X60-EK Evaluation Kit is no longer in production due to memory components that have been obsoleted. For those new to the SAM9X60, take a look at the SAM9X60-Curiosity Development Board.

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.

SAM9X60-EK Debug J-Link-OB

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.

Back to Top

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.

SAM9X60-EK Debug UART

Back to Top

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

Windows Device Manager: CDC J-Link

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

Windows Device Manager: USB Serial Port

Back to Top

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

MacOs Coolterm

Back to Top

Linux

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​

$ 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

Port 24​

$ dmesg
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.

If you are not able to access the serial port, try adding the user to dialout group. This will give the user access to USB ports under the dialout group.

$ sudo adduser user_name dialout

Back to Top

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.

SAM9X60-EK Power Options

SAM9X60-EK Host Computer connect to USB J-Link-OB port

If no SD memory card is installed, the J-Link Onboard LED (D9) will flash green and the RGB LED (LD1) will flash red.

If an SD memory card with a Linux image is installed, the RGB LED (LD1) will flash blue indicating proper operation of the Linux Operating System.

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.

The black wire of the FTDI-based cable goes to the GND of port J24.

SAM9X60-EK Host Computer connection to Serial Port UART

If no SD memory card is installed, the J-Link Onboard LED (D9) will flash green and the RGB LED (LD1) will flash red.

If SD memory card with a Linux image is installed, the RGB LED (LD1) will flash blue indicating proper operation of the Linux Operating System.

Back to Top

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.

Terminal emulator showing RomBOOT prompt

Congratulations! Serial communication is successfully established.

Back to Top

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:

Back to Top

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.

Back to Top

Learn More

Back to Top