Difference between revisions of "Communicate with hardware using USB cable for Ubuntu"

From eLinux.org
Jump to: navigation, search
(Created page with " === Communicate with Xilinx development boards via USB. === <p>Xilinx boards are equipped with Silabs devices as terminal communication, RS232, medium. To be able to talk to...")
 
 
Line 68: Line 68:
 
[[File:GTKtermSelectPort.png]]
 
[[File:GTKtermSelectPort.png]]
 
* Set the speed, bits and party and start working/playing.
 
* Set the speed, bits and party and start working/playing.
 +
 +
 +
[[category:zynq]]

Latest revision as of 17:23, 15 February 2013

Communicate with Xilinx development boards via USB.

Xilinx boards are equipped with Silabs devices as terminal communication, RS232, medium. To be able to talk to an application, such as a PicoBlaze 8-bit processor application, your Linux machine must have the appropriate Silabs drivers. Ubuntu 12.04LTS and later is default equipped with the Silabs drivers! No installation of drivers is necessary. The only thing necessary is to check whether the Ubuntu machine can communicate over USB with the attached Xilinx development board.

To do this:

  • Connect the PC via an USB cable to the USB UART port of the Xilinx development board.
  • Turn the board on.

Open a terminal on you Ubuntu machine by pressing:

[CTRL] + [ALT] + T

To find if the Silabs driver on the PC understood that a hardware device is connected, type:

lsusb

The output text of this command in the terminal is something like this:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 005 Device 003: ID 0a5c:5801 Broadcom Corp. BCM5880 Secure Applications Processor with fingerprint swipe sensor
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp. Integrated Keyboard
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp. Integrated Touchpad / Trackstick
Bus 003 Device 006: ID 413c:8156 Dell Computer Corp. Wireless 370 Bluetooth Mini-card
Bus 006 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device

The last line, can be on your system another line, shows that the Silabs device on the Xilinx development board has been detected and that the drivers on the PC are running.

To find out what RS232 (UART) port is used by the USB driver, type:

dmesg | grep -ie cp210*
   

The terminal return text looks like:

[ 1590.761301] USB Serial support registered for cp210x
[ 1590.761340] cp210x 7-2:1.0: cp210x converter detected
[ 1591.020413] usb 7-2: cp210x converter now attached to ttyUSB2
[ 1591.020460] usbcore: registered new interface driver cp210x
[ 1591.020465] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver

Again, on your machine the numbers might be different. The important line for us is that telling where the driver connects to a TTY port, in this case it is line three "cp210x converter now attached to ttyUSB2".


GTKterm

Setup the communication with a terminal window so that commands can be exchanged with the application running in the FPGA on the development board.

I'm using here GTKterm as an example but any other debug terminal program can be used. If GTKterm is not installed on you machine and you want to use it:

  • Open via the DASH (Unity) the Ubuntu Software Center.
  • Type in the search window (top right) GTKterm
  • While typing the screen will look as the figure below:

InstallGtkterm.png

  • Install the Serial Port Terminal.
  • Now GTKterm is installed and available for use.Start it from the open terminal window as root.
sudo gtkterm


  • Provide your sudo password and the serial terminal GUI will appear. Click 'Configuration' and select 'Port', as shown in the figure below.

GTKterm Port Select.png

  • In the pop-up window browse to the USB TTY port as shown in the figure below.

GTKtermSelectPort.png

  • Set the speed, bits and party and start working/playing.