Adding a serial terminal


2012-03-21Publicerad av Sven-Åke Andersson

Introduction


We need a solution for communicating with the programs running on our board. We will use the UART implemented in our system for the serial communication. The UART pins are connected to an UART-USB bridge device on the board and then connected to the USB connector. 




 
The Atlys board includes an EXAR USB-UART bridge to allow Linux applications to communicate with the board using a USB port. Free drivers allow USB-based (i.e., serial port) traffic on the PC/Linux workstation to be seamlessly transferred to the Atlys board using the USB port at J17 marked UART. The EXAR part using a two-wire serial port with software flow control (XON/XOFF).

Free Windows and Linux drivers can be downloaded from www.exar.com. After the drivers are installed, I/O commands from the PC directed to the USB port will produce serial data traffic on the A16 and B16 FPGA pins.


Hardware implementation


This is what the Atlys board implementation looks like:
 
 

 


Downloading and installing Linux drivers


After unzipping, unpacking and running make, the downloaded packages looks like this:

 



The README.txt file tells us what to do. I found out that I had to redo this settings after i rebooted my system. Can anyone help me to make these settings permanent.

Remove old driver:

cd vizzini_install_dir
sudo rmmod cdc-acm
sudo rmmod vizzini
sudo modprobe -r usbserial


Install the vizzini driver module:

sudo modprobe usbserial
sudo insmod ./vizzini.ko


 



After installing the driver we can use the command lsusb to see all the USB devices supported.

 


Removing the USB cable and inserting it again gives the following log messages. Use the command dmesg to display the logfile.

 

 


Setting up a serial terminal



We will setup a serial terminal emulator program running in our Linux workstation to emulate the console. We can use for example GTKterm or minicom. GTKterm has a nice GUI which makes it really easy to setup. Let's use GTKterm. For more information about GTKterm read this blog entry.

 

Using GTKterm



We start the program using the command: gtkterm& and open the Port Configuaration window:

 


 

Select the USB port connected to the Atlys board and set the speed to 115200 and we are ready to run. Here is a print out from the PrimeNumbers program executing in the system.