Benefits of a serial cable, which to buy and how to use it.

Sub forum for Parallella daughter cards and accessories

Moderator: Folknology

Benefits of a serial cable, which to buy and how to use it.

Postby Gravis » Wed May 14, 2014 3:43 pm

Having gone through this myself recently, I thought I would help some of you avoid the headache of figuring out what to get and how to use it.

Benefits of a serial monitoring cable
If you are having problem with your Parallella and need to debug it or want instant access to a terminal, you should get a usb serial monitoring cable. You can see everything that happens during boot, even loading the binary into the Zynq chip and then it provides a command line interface when it's finished booting.

Which cable to buy
An easy one that works with all platforms is a USB cable that uses a PL2303HX chip and has 4 easy to connect wires at the end. You can find these on Amazon.com (here, but ensure it ships from the US unless you dont mind waiting 3 or 4 weeks) or Ebay.com (here) for about $5 shipped, just look for "PL2303HX USB" and look for an image like this and you know it's the right cable:

41MQo82O0LL._AA160_.jpg
USB serial monitor cable
41MQo82O0LL._AA160_.jpg (5.47 KiB) Viewed 21130 times

If you are faint of heart, you can buy it from Adafruit for $10 + shipping.

How to use it

Hardware setup
To connect the cable, you need to connect it to header pins in the proper configuration.
from the ethernet jack to edge of the PCB:
* TX: white wire
* RX: green (sometimes blue) wire
* GND: black wire
do not connect the red wire to anything.

Software setup
If you use Linux, I suggest using GtkTerm (in standard repos).

You need to apply the following settings to your terminal application:

* Device: /dev/ttyUSB0 (on Linux)
* Baud Rate: 115200
* Parity: none
* Bits: 8
* Stopbits: 1
* Flow Control: none

Trying it out
After you have connected the serial cable to the Parallella, plug in the USB side to your computer. Then open your terminal program and configure it configure it. Finally plug the power into your Parallella.

The Parallella will begin booting and your terminal will show everything it's doing.

Example output:

Code: Select all
Zynq clock init
sched_clock: 16 bits at 54kHz, resolution 18432ns, wraps every 1207ms
timer #0 at f0006000, irq=43
Console: colour dummy device 80x30
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:  8
... MAX_LOCK_DEPTH:          48
... MAX_LOCKDEP_KEYS:        8191
... CLASSHASH_SIZE:          4096
... MAX_LOCKDEP_ENTRIES:     16384
... MAX_LOCKDEP_CHAINS:      32768
... CHAINHASH_SIZE:          16384
 memory used by lock dependency info: 3695 kB
 per task-struct memory footprint: 1152 bytes
Calibrating delay loop... 1325.46 BogoMIPS (lpj=6627328)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc05e08a0 - 0xc05e08d4
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 512 kB
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
zynq_gpio e000a000.gpio: gpio at 0xe000a000 mapped to 0xf0010000
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
cfg80211: Calling CRDA to update world regulatory domain
Switched to clocksource ttc_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 6, 294912 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 3, 40960 bytes)
UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
bounce pool size: 64 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 1474
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.ps7-dma:    DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.uart: ttyPS0 at �console [ttyPS0] enabled, bootconsole disabled
console [ttyPS0] enabled, bootconsole disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f0016000
[drm] Initialized drm 1.1.0 20060810
platform 6c000000.axi_hdmi: Driver axi-hdmi requests probe deferral
brd: module loaded
loop: module loaded
xqspips e000d000.qspi: master is unqueued, this is deprecated
m25p80 spi32766.0: found n25q128a13, expected m25p80
m25p80 spi32766.0: n25q128a13 (16384 Kbytes)
5 ofpart partitions found on MTD device spi32766.0
Creating 5 MTD partitions on "spi32766.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000540000 : "config"
0x000000540000-0x000000fc0000 : "image"
0x000000fc0000-0x000001000000 : "spare"
xqspips e000d000.qspi: at 0xE000D000 mapped to 0xF0018000, irq=51
libphy: XEMACPS mii bus: probed
xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
usbcore: registered new interface driver rtl8192cu
usbcore: registered new interface driver zd1201
aoe: AoE v85 initialised.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
xusbps-dr e0002000.usb: Unable to init USB phy, missing?
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
xi2cps e0004000.i2c: 100 kHz mmio e0004000 irq 57
usbcore: registered new interface driver zr364xx
usbcore: registered new interface driver stkwebcam
usbcore: registered new interface driver s2255
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
gspca_main: v2.14.0 registered
usbcore: registered new interface driver benq
usbcore: registered new interface driver conex
usbcore: registered new interface driver cpia1
usbcore: registered new interface driver etoms
usbcore: registered new interface driver finepix
usbcore: registered new interface driver jeilinj
usbcore: registered new interface driver jl2005bcd
usbcore: registered new interface driver kinect
usbcore: registered new interface driver konica
usbcore: registered new interface driver mars
usbcore: registered new interface driver mr97310a
usbcore: registered new interface driver nw80x
usbcore: registered new interface driver ov519
usbcore: registered new interface driver ov534
usbcore: registered new interface driver ov534_9
usbcore: registered new interface driver pac207
usbcore: registered new interface driver gspca_pac7302
usbcore: registered new interface driver pac7311
usbcore: registered new interface driver se401
usbcore: registered new interface driver sn9c2028
usbcore: registered new interface driver gspca_sn9c20x
usbcore: registered new interface driver sonixb
usbcore: registered new interface driver sonixj
usbcore: registered new interface driver spca500
usbcore: registered new interface driver spca501
usbcore: registered new interface driver spca505
usbcore: registered new interface driver spca506
usbcore: registered new interface driver spca508
usbcore: registered new interface driver spca561
usbcore: registered new interface driver spca1528
usbcore: registered new interface driver sq905
usbcore: registered new interface driver sq905c
usbcore: registered new interface driver sq930x
usbcore: registered new interface driver sunplus
usbcore: registered new interface driver stk014
usbcore: registered new interface driver stk1135
usbcore: registered new interface driver stv0680
usbcore: registered new interface driver t613
usbcore: registered new interface driver gspca_topro
usbcore: registered new interface driver tv8532
usbcore: registered new interface driver vc032x
usbcore: registered new interface driver vicam
usbcore: registered new interface driver xirlink-cit
usbcore: registered new interface driver gspca_zc3xx
usbcore: registered new interface driver ALi m5602
usbcore: registered new interface driver STV06xx
usbcore: registered new interface driver gspca_gl860
usbcore: registered new interface driver Philips webcam
cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1
usbcore: registered new interface driver cpia2
usbcore: registered new interface driver sn9c102
usbcore: registered new interface driver em28xx
Em28xx: Initialized (Em28xx Audio Extension) extension
usbcore: registered new interface driver usbtv
zynq_wdt f8005000.swdt: Xilinx Watchdog Timer at f0032000 with timeout 10s
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: Invalid maximum block size, assuming 512 bytes
mmc0: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
hidraw: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ashmem: initialized
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SS08G 7.40 GiB
 mmcblk0: p1 p2
adv7511-hdmi-snd adv7511_hdmi_snd.4:  adv7511 <-> 75c00000.axi-spdif-tx mapping ok
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
Console: switching to colour frame buffer device 240x67
axi-hdmi 6c000000.axi_hdmi: fb0:  frame buffer device
axi-hdmi 6c000000.axi_hdmi: registered panic notifier
[drm] Initialized axi_hdmi_drm 1.0.0 20120930 on minor 0
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:
  #0: HDMI monitor
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
Freeing unused kernel memory: 188K (c0878000 - c08a7000)
 * Setting up X socket directories...                                    [ OK ]
systemd-logind[1544]: Failed to save seat data for seat0: No such file or directory

Last login: Thu Jan  1 00:00:16 UTC 1970 on tty1
root@linaro-nano:~#

at the very end you see root@linaro-nano:~# which is a command line prompt as root so that you can execute any command line program you want at any time without needing a network connection or keyboard attached to the Parallella.

ENJOY!
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: Benefits of a serial cable, which to buy and how to use

Postby greytery » Wed May 14, 2014 4:30 pm

Thanks Gravis.

For those in the UK try :
http://www.maplin.co.uk/p/usb-to-serial-ttl-cable-n74de @ £9.99. Handy if you are passing one of their shops.
or
https://www.modmypi.com/USB-to-TTL-Serial-Cable-Debug-Console-Cable-for-Raspberry-Pi @ £6.99
Inc. VAT, plus post.

I can confirm that it works with a Raspberry Pi, but will pay attention to the notes from Gravis when fitting to the Parallella.
There are a few tutorials on installation on Windows, including pointers to the necessary drivers, and connection to Pi. Most of these should transfer easilly.

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: Benefits of a serial cable, which to buy and how to use

Postby over9000 » Wed May 14, 2014 8:52 pm

greytery wrote:I can confirm that it works with a Raspberry Pi

OK, so it's not the same thing, but if I'm reading the Parallella manual correctly, if you have a Pi you should be able to connect it directly to the serial port since they both use the same 3v3 voltage levels. Rather than buying something like this, using the Pi instead is going to be my plan when I get my board. If you don't have a Pi, though, a cable/converter like this is definitely worth investing in (based on my experiences with other similar dev boards).
over9000
 
Posts: 98
Joined: Tue Aug 06, 2013 1:49 am

Re: Benefits of a serial cable, which to buy and how to use

Postby CIB » Thu May 15, 2014 5:19 am

Thanks, this will be useful for me, since I have no monitor to plug the parallela into.
CIB
 
Posts: 108
Joined: Sat Jul 13, 2013 1:57 pm

Re: Benefits of a serial cable, which to buy and how to use

Postby jaor » Fri Jul 04, 2014 8:23 pm

Hi, can you update your post with the following information (I'm a newbie, and was struggling a bit with it ;) ):

I am using PL2303HX based converter. As of this, I had to connect wires by myself, so there was no colors by default.
According to this post (viewtopic.php?f=10&t=845&start=20) you have to connect RX-TX and TX-RX and GND-GND.

Thanks for your post, it helped me a lot with debugging!
jaor
 
Posts: 3
Joined: Fri Jul 04, 2014 8:15 pm

Re: Benefits of a serial cable, which to buy and how to use

Postby daniel_dbb » Sat Sep 10, 2016 5:53 pm

Hi,
I am using Adafruit FT232H Breakout board to communicate at TX/RX port with Parallella.
After Power ON I get:

U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08) // <--- First Line

... (see more below)

Starting kernel ...
Uncompressing Linux... done, booting the kernel. // <--- Last Line

and after last line nothing more

No Promt for interaction with Parallella!

Why?
Does anybody expirienced same problem with Adafruit USB-UART Adapter?

Bye,
Daniel








U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08)

I2C: ready
DRAM: 992 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Configuring PL and Booting Linux...
Device: SDHCI
Manufacturer ID: 1b
OEM: 534d
Name: 00000
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 59.6 GiB
Bus Width: 4-bit
reading parallella.bit.bin

2083744 bytes read
reading uImage

4468792 bytes read
reading devicetree.dtb

8607 bytes read
## Booting kernel from Legacy Image at 03000000 ...
Image Name: Linux-3.12.0-g0bc9c3a-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4468728 Bytes = 4.3 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
Booting using the fdt blob at 0x02a00000
Loading Kernel Image ... OK
OK
Loading Device Tree to 1fffa000, end 1ffff19e ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
daniel_dbb
 
Posts: 6
Joined: Thu Jun 09, 2016 11:17 pm

Re: Benefits of a serial cable, which to buy and how to use

Postby sebraa » Sun Sep 11, 2016 8:43 pm

By default, the serial console is disabled in new images.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: Benefits of a serial cable, which to buy and how to use

Postby olajep » Mon Jan 09, 2017 3:33 pm

sebraa wrote:By default, the serial console is disabled in new images.

It is enabled, but if you boot the board without a serial cable connected, the driver could detect a floating RX pin and disable serial console input to prevent the board from wasting CPU cycles on bogus interrupts.

// Ola
_start = 266470723;
olajep
 
Posts: 139
Joined: Mon Dec 17, 2012 3:24 am
Location: Sweden


Return to Daughter Cards & Accessories

Who is online

Users browsing this forum: No registered users and 3 guests