SAMA5D29-Curiosity – Console Serial Communications

Last modified by Microchip on 2024/02/20 15:54

Introduction

In this training topic, you will learn how to connect a host computer running a terminal emulation program to the SAMA5D29-Curiosity Development Board (P/N: EV07R15A) Serial Debug Port (J28) 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 dedicated 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 operating systems, such as Linux® boot log, and debug information from utility programs, for example, from SAM-BA® In-System Programmer applets

What you will need: 

  • SAMA5D29-Curiosity Development Board 
  • Personal computer (Windows®, macOS®, Linux) running a terminal emulation program 
  • USB-to-Serial 3.3 or 5.0 VDC TTL Level adapter with a 6-pin single-in-line 0.1” pitch connector 
  • To power the SAMA5D29-Curiosity you will either: 
  • Connect a USB Type-C cable to USB-A port (J1) (included) 
  • Connect an external 5 VDC power supply to DC Jack (J2) 

Prerequisites

  • Familiarity with the features of the SAMA5D29-Curiosity Development Board. 
  • Knowledgeable of the SAMA5D2 Series Boot Process 

Serial Debug Port (J28)

The Serial Debug Port (J28) is a dedicated TTL-level serial port connection between the SAMA5D29 and J28. A level shifter (U12) allows either 3.3 or 5.0 VDC levels.  

SAMA5D29-Curiosity - Debugging

You will need a USB-to-Serial 3.3 or 5.0 VDC TTL level adapter with a 6-pin single-in-line 0.1” pitch connector to connect the Serial Debug Port (J28) to the host computer. Take care to align Pin 1 (GND) of the Curiosity board to the adapter Pin 1 (Look for an arrow on the connector and a black wire). 

Take care to align Pin 1 (GND) of the header J28 to the USB-to-Serial adapter Pin 1 (look for an arrow on the connector and a black wire). 

Terminal Emulation Program

Download, install, and configure a Terminal Emulation program onto your host computer. There are several choices for terminal programs for Windows, macOS, and Linux. 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). Set the terminal program for serial communications: 

  • Baud: 115200 
  • Data Bits: 8 
  • Parity: None 
  • Stop Bits: 1 

Windows Device Manager: USB Serial Port

macOS

  • Screen 
    • Find the serial port: $ ls /dev/tty.* 
    • To run: $ screen /dev/tty.usbmodemFD121 115200 
    • To quit: $ Control-a $ Control-\ 
  • Minicom 
  • Serial 
    • Available from the Apple App Store 
  • CoolTerm 

To locate the serial port, you can open the CoolTerm application and note the available ports that are available in the Port selection. Set the terminal program for serial communications: 

  • Baud: 115200 
  • Data Bits: 8 
  • Parity: None 
  • Stop Bits: 1 

macOS Coolterm

Linux

  • minicom 
  • PuTTY 
    • You can install minicom and putty from the command line: $ sudo apt-get install putty 
    • Set the terminal program for serial communications: 
      • Baud: 115200 
      • Data Bits: 8 
      • Parity: None 
      • Stop Bits: 1 

To find the USB port, execute dmesg on the command line: 

$ 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 

Back to Top

Connecting Host to Target

Ensure no SD memory cards are inserted. 

Apply Power:

Apply power to the development board by either connecting: 

  1. USB Type-C connector to USB-A port (J1), or 
  2. Applying 5.0 VDC to DC Jack (J2). 

Connect to Serial Debug Port:

Connect the USB-to-Serial 3.3 or 5.0 VDC TTL level adapter to the host computer. Take care to align Pin 1 (GND) of the Curiosity board to the adapter Pin 1 (Look for an arrow on the connector and a black wire). 

Take care to align Pin 1 (GND) of the header J28 to the USB-to-Serial adapter Pin 1 (look for an arrow on the connector and a black wire). 

SAMA5D29-Curiosity - Console Serial Communications (Serial Debug)

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 (SW2) on the SAMA5D29-Curiosity. 

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. 

Console: Serial Debug with no SD Memory Card

Back to Top

Summary

In this training topic, you learned how to connect a host computer running a terminal emulation program to the SAMA5D29-Curiosity Development Board Serial Debug port (J28) to access the Console. 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