TS-7800

From embeddedTS Manuals
TS-7800
TS-7800.jpg
Product Page
Documentation
Schematic
Mechanical Drawing
FTP Path
MV88F5182 User Manual
MV88F5182 Opensource Manual
MV88F5182 Datasheet
Specifications
Operating Temperature
Cold -20C
Hot 70C

Overview

The TS-7800 is a RoHS compliant Single Board Computer (SBC) based on a Marvell MV88F5182 500MHz ARM9 CPU. An internal 32-bit PCI bus provides a standard set of high-end on-board peripherals such as 10/100/1000 ethernet, dual SATA and dual High-Speed host USB 2.0. The TS-7800 features 128MB of DDR-RAM and 512MB of high-speed NAND flash.

Getting Started

A Linux PC is recommended for development. For developers who use Windows, virtualized Linux using VMWare or similar are recommended in order to make the full power of Linux available. The developer will need to be comfortable with Linux anyway in order to work with embedded Linux on the target platform. The main reasons that Linux is useful are:

  • Linux filesystems on the microSD card can be accessed on the PC.
  • More ARM cross-compilers are available.
  • If recovery is needed, a bootable medium can be written.
  • A network filesystem can be served.
  • Builds such as Linux kernel, buildroot, yocto, distro-seed will not work from WSL1/2 on a case insensitive filesystem.
WARNING: Be sure to take appropriate Electrostatic Discharge (ESD) precautions. Disconnect the power source before moving, cabling, or performing any set up procedures. Inappropriate handling may cause damage to the board.

The TS-7800 receives power through the +5VDC power connector with a 1A minimum supply. If you have OP-SWITCHREG there will be a socket connector that will accept 8-30VDC.

Get a Console

The boot messages, by default, are all displayed on COM1 at 115200 baud. The TS-7800 board has Linux installed by default on onboard flash. Upon bootup, The board will boot within 1.1 seconds to a Linux prompt on UART #0 (/dev/ttyS0).

Use a null modem cable to connect the ARM system to your workstation. If you do not have a COM port on your system (as many newer systems do not), you can find a USB serial adapter that will bring out RS232.

Console from Linux

There are many serial clients for Linux, but 3 simple ones would be picocom, screen, and minicom. These examples assume that your COM device is /dev/ttyUSB0 (common for USB adapters), but replace them with the COM device on your workstation.

Linux has a few applications capable of connecting to the board over serial. You can use any of these clients that may be installed or available in your workstation's package manager:

Picocom is a very small and simple client.

picocom -b 115200 /dev/ttyUSB0

Screen is a terminal multiplexer which happens to have serial support.

screen /dev/ttyUSB0 115200

Or a very commonly used client is minicom which is quite powerful:

minicom -s
  • Navigate to 'serial port setup'
  • Type "a" and change location of serial device to '/dev/ttyUSB0' then hit "enter"
  • If needed, modify the settings to match this and hit "esc" when done:
     E - Bps/Par/Bits          : 115200 8N1
     F - Hardware Flow Control : No
     G - Software Flow Control : No
  • Navigate to 'Save setup as dfl', hit "enter", and then "esc"

Console from Windows

Putty is a small simple client available for download here. Open up Device Manager to determine your console port. See the putty configuration image for more details.

Device Manager Putty Configuration

Initrd / Busybox / Fastboot

After the TS-7800 is first booted you will be at this shell:

 >> TS-BOOTROM - built May 11 2011
 >> Copyright (c) 2008, Technologic Systems
 >> Booting from onboard NAND flash...
 .
 .
 .
 .
 Finished booting in 0.78 seconds
 Type 'tshelp' for help
 / #

This is a busybox shell which presents you with a very minimalistic system. This filesystem is loaded into memory, so none of the changes will be saved unless you type 'save', or mount a filesystem as read write. This can also provide a simple mechanism for running your application in an entirely read only environment. The linuxrc script will be the first thing executed as soon as the kernel is loaded. This sets the default IP address, starts the userspace ctl applications, and more. Read the linuxrc for more information.

While busybox itself doesn't contain much functionality, it does mount the Debian partition under /mnt/root/. It will also add common paths and load libraries from the Debian system. Many of the Debian applications will work by default. If an application relies on certain paths being in certain places, or running services, you should instead boot to Debian to run them.

This shell when started on the COM port is what is blocking a Debian boot. If you close it by typing 'exit', the boot process will continue. If you are connected through telnet, this will instead open up its own instance of the shell so typing 'exit' will only end that session. You would have to relink the linuxrc script to always boot to a specific partition from telnet.

The compiled instance of busybox includes internal commands listed below:

/ # /bin/busybox --help
BusyBox v1.7.1 (2008-07-16 14:59:19 MST) multi-call binary
Copyright (C) 1998-2006  Erik Andersen, Rob Landley, and others.
Licensed under GPLv2.  See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as!

Currently defined functions:
	[, [[, ash, basename, cal, catv, chgrp, chmod, chown,
	chroot, cksum, clear, comm, cp, cttyhack, cut, date, dd,
	df, dirname, dmesg, du, echo, egrep, env, eptime, expr,
	false, fdisk, fgrep, find, free, ftpget, ftpput, getopt,
	grep, gunzip, halt, head, hexdump, hostname, ifconfig,
	insmod, kill, killall, ln, ls, lsmod, md5sum, mdev, mkdir,
	mkfifo, mknod, modprobe, more, mount, mtdcp, mv, mvtime,
	netstat, nice, nohup, nslookup, peekpoke, ping, ping6,
	pivot_root, poweroff, printenv, printf, ps, pscan, pwd,
	reboot, rm, rmdir, rmmod, route, rx, sed, setconsole,
	setlogcons, sh, sha1sum, sleep, split, stat, stty, sum,
	sync, tail, tar, tee, telnetd, test, tftp, time, top,
	tr, traceroute, true, tty, udhcpc, umount, uname, unzip,
	uptime, usleep, uudecode, uuencode, vi, wget, which, xargs,
	zcat
Note: You may want to refer to the sources for some of these commands if they are not behaving as you would expect. Busybox implements them so they are incredibly small, but they don't always provide all of the functionality as is in the standard gnu/bash shell commands. Some commands will provide the same functionality like date, but may only work with very specific formats.

We also provide the ts7800.subr which provides the following functions:

 bit_set()
 bit_clr()
 bit_get()
 led0()
 pc104on()
 pc104off()
 tshelp()
 sdmount()
 mtdmount()
 help()

Boot Process

Boot Process

The MBR, kernel, and initrd can be loaded from MicroSD, SD, or the onboard flash. Once this is loaded you can boot to any other storage (SATA drive, USB, NFS, etc). JP1 will allow you to pick between booting between the SD card sockets and the onboard flash, but if both SD and MicroSD are populated preference will be given to MicroSD.

Once you are booted to the initrd, you can change the linuxrc script to boot into the full linux installation on any device. We provide several scripts that you can relink to linuxrc:

Script Function
linuxrc-fastboot (default) Boots to a shell. Once the shell is closed (type exit) it will boot to Debian on the full sized SD card.
linuxrc-mtdroot Boots directly to Debian on the onboard flash.
linuxrc-nfsroot Attempts to NFS root to 192.168.0.1:/tsarm-nfsroot. You can edit this script to use your own server host and path.
linuxrc-sdroot Boots directly to Debian on the full sized SD card.

To relink to automatically boot to sd, you would use this command

rm linuxrc && ln -s linuxrc-sdroot linuxrc && save

To change the boot device to MicroSD card in these scripts, you can run a sed script on the linuxrc-fastboot or linuxrc-sdroot scripts:

sed --in-place 's/tssdcardb4/tssdcarda4/g' /linuxrc-sdroot

If you want to boot to USB or SATA you may want to modify the linuxrc-sdroot or linuxrc-fastboot to mount your storage device at /mnt/root/.

Jumper Configuration

Jumper Function
JP1 Boot to SD (Otherwise nand)
JP2 User Configurable
JP3 Lowers CPU clock
Note: See the FPGA Register Map for reading the states of the jumpers in software
Note: While JP3 does lower the clock speed, it does not lower power consumption

Backup / Restore

SD Card

If backing up on a separate workstation, keep in mind windows does not have direct block device support needed to write these images. You will also need to determine the SD card device. You can usually find this in the output of 'dmesg' after inserting the SD card and you will typically see something like '/dev/sdb' as the block device and '/dev/sdb1' for the first partition. On some newer kernels you will see '/dev/mmcblk0' as the block device and '/dev/mmcblkop1' for the first partition. For these examples I will use the '/dev/mmcblk0' format. Both of the sd cards will use the same commands, except when backing up or restoring on the TS-7800 you would replace /dev/tssdcarda (MicroSD) or /dev/tssdcardb (SD) depending on which device you want to use. These examples will use /dev/tssdcarda.

You can find the latest image here

If you are backing up directly on the board you will likely need to use some kind of offboard storage like a thumbdrive or external hard drive.

From Workstation


Backup

Entire SD card

dd if=/dev/mmcblk0 of=/path/to/backup.dd bs=32k && sync && sync

Kernel

dd if=/dev/mmcblk0p2 of=/path/to/zImage bs=32k && sync && sync

Initrd

dd if=/dev/mmcblk0p3 of=/path/to/initrd bs=32k && sync && sync

Restore

Entire SD card

dd if=/path/to/backup.dd of=/dev/mmcblk0 bs=32k && sync && sync

Kernel

dd if=/path/to/zImage bs=32k of=/dev/mmcblk0p2 && sync && sync

Initrd

dd if=/path/to/initrd bs=32k of=/dev/mmcblk0p3 && sync && sync

From TS-7800


Backup

Entire card

dd if=/dev/tssdcarda of=/path/to/backup.dd bs=512 && sync && sync

Kernel

dd if=/dev/tssdcarda2 of=/path/to/zImage bs=512 && sync && sync

Initrd

dd if=/dev/tssdcarda3 of=/path/to/initrd bs=512 && sync && sync

Restore

The entire card from SBC

dd if=/path/to/sdimage.dd of=/dev/tssdcarda conv=sync bs=512 && sync && sync

Kernel

dd if=/path/to/zImage of=/dev/tssdcarda2 conv=sync bs=512 && sync && sync

Initrd

dd if=/path/to/zImage of=/dev/tssdcarda3 conv=sync bs=512 && sync && sync

Onboard Flash

To restore the onboard flash, you must first boot to a 512MB SD image. You can write that image to the onboard flash with this command:

createmtdboot && createmtdroot

This can take approximately 5 minutes.

WARNING: These scripts are only set up to copy the MBR that works with the 2.6.21 kernel image.

Operating Systems

Linux

Our supported OS is Debian 4.0 (Etch). This Marvell processor is also capable of running later EABI distributions. We do provide an EABI lenny distribution as is as well here. You can install this on the last partition of the SD card. Recreate the partition and extract the filesystem on the partition:

#assuming the SD card is mounted at /dev/mmcblk0 on your workstation:
mkfs.jfs /dev/mmcblk0p4
mkdir /mnt/sd
mount /dev/mmcblk0p4 /mnt/sd
cd /mnt/sd/
tar --numeric-owner -xvf /path/to/debian-lenny-eabi-armel-512MB-mar032009.tar.gz
cd /
umount /mnt/sd

So far any of Debian's later distributions should work with this processor as well. If you want to pursue this, look into creating a debootstrap on your boot device.

After the desired Linux Kernel is loaded and executed, the file system loads and networking, logging, Apache web server, etc. are all started. When the login prompt is displayed, type "root" to login, with no password. A Bash login prompt will then appear. At this point, you are ready to enjoy your TS-7800 SBC running Linux. Debian already has solid documentation for their distribution which you may want to refer to for actual usage of the OS.

Linux Kernel

Marvell has strongly promoted running Linux on this chip and has done most of the legwork in creating a patch set to the Linux 2.6 kernels, but we have also had to modify the Linux Kernel (TS-Kernel) so it can support the on-board Flash chip (via mtd drivers) and the SD card driver. The TS-7800 SBC's are shipped standard with full-featured Debian linux operating system utilizing the Linux-boot-Linux boot loader installed in the on-board Flash memory. The supported TS-Kernel used is based upon the version 2.6.21, patched and compiled for the MV 88F5182 processor.

We also provide a 2.6.36 kernel as is. This will work on the SD card, but you will not be able to restore this SD image to the onboard nand without the correct MBR with the appropriate ATAGS. The vanilla Linux Kernel also has support for the TS-7800.

When you compile source code there are always lots of options for toolchains (soft float vs hard float...) but the two major categories customers really need to know about are version of gcc and version of glibc. The version of gcc is important when compiling the kernel because the kernel is literally millions of lines of code, so a lot of corner cases are encountered in the kernel. As gcc releases new versions, they sometimes change the way they handle corner cases. For example, in one version they may call a certain corner case a warning and let the corner case go by, but in another version they might call it an error and stop compiling. So you need to make sure you have the version of gcc that is compatible with your particular kernel or you may get an error where another version would have given you a warning. For the 7800 use "arm-none-linux-gnueabi-gcc" as the toolchain. The version of glibc is important for people compiling user space applications. libc is the C library where all the standard C functions are implemented.

In order to make things more efficient from a code size standpoint, Technologic Systems put one copy of the libc libraries in user space and let everyone share this one copy as opposed to giving everyone their own copy of the libc library. This is called dynamic linking. Static linking is where each binary has it's own copy of all the libraries it needs. When you compile a program you have to link against a version of the C libraries so the compiler can verify functions like printf() really do exist and you are passing the right arguments and lots of other details the compiler needs to know.

If you link against a version of glibc when you compile it is a really good idea to ensure you have that same version of glibc running on the board. In theory glibc is backwards compatible so if you link against an older version you should be able to run using a newer version, but this isn't always the case. In embedded systems where stability is one of your major concerns taking risks is not a good idea. For really large projects like php or apache it's usually a good idea to take a look at what version of gcc is recommended also, although for the most part this is not an issue for user space programs because the probability of them having code for one of the corner cases gcc may have changed is much lower.

Recompiling the Kernel

WARNING: BACKUP YOUR DATA FIRST

Prerequisites

This guide is intended to run on an x86 compatible Linux workstation. While you may be able to compile the kernel on the board, we do not recommend it. A typical workstation compile will take several minutes. The same compile on the board will take several hours.

RHEL/Fedora/CentOS:

yum install ncurses-devel ncurses
yum groupinstall "Development Tools" "Development Libraries"
Ubuntu/Debian:
apt-get install build-essential libncurses5-dev libncursesw5-dev

For other distributions, please refer to their documentation to find equivalent tools. Next you need to set up the cross compiler and sources:

# Download the cross compile toolchain (OABI)from Technologic Systems:
wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7800-linux/cross-toolchains/ts7800-crosstool-linux-gnueabi-2005q3-2.tar.gz

#Extract to current working directory:
tar xvf ts7800-crosstool-linux-gnueabi-2005q3-2.tar.gz

#Download the kernel sources
wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7800-linux/sources/linux-2.6.21-ts-src-latest.tar.gz

cd linux-2.6.21-ts

Export the CROSS_COMPILE variable with a path that points to the appropriate cross-compiler. If you followed the steps above exactly, the toolchain is extracted into the same directory as the kernel.

export CROSS_COMPILE=../arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi
export ARCH=arm

Now you will want to configure your settings. You can start with our default config by running:

make ts7800_defconfig

At this point you can configure any additional options with:

make menuconfig

For example, to include CIFS support use the arrow and Enter keys to navigate to Filesystems -> Network File Systems -> CIFS Support. Press "y" to include CIFS support into the kernel (alternatively, you could modularize the feature with "m" so you can enable or disable the module on demand which will also enable you to simply copy/paste the cifs.ko into the correct path in the kernel instead of copying the entire kernel (outlined below in appendix)). Keep hitting "exit" until you're prompted to save changes, choose "yes".

After you have made your selection, you can build your kernel and modules with:

make && make modules
Note: If you receive an error about PATH_MAX not being defined, you will need to edit scripts/mod/sumversion.c and add "#define PATH_MAX 1024".

The new kernel will be at "arch/arm/boot" in a compressed format called zImage (the uncompressed version is simply called Image, but it is REQUIRED that it be < 3.1MB (3145728 bytes in size). If it does not fit, you can go back in and change any changed options from included (*) to modules (m).

Once you have a zImage that fits, you can copy this to the SD card by following the "Restore Kernel steps in the #Backup / Restore section.

You will need to install several of these modules to the initrd (third partition) of the SD card. Mount the third partition of the SD card and copy these files:

# Create a directory to mount this device
mkdir -p /mnt/sd/

# Note, your device may be something different.  Check 'dmesg' to get the correct name.  On my system, this is /dev/sdg.
# If you receive an error here, try restoring to the stock image first.  You may also need 
# to load kernel modules for filesystem support.

mount /dev/sdg3 /mnt/sd

# This assumes you are still in the root of the kernel sources
cp ./drivers/mtd/nand/ts7800.ko /mnt/sd/
cp ./drivers/mmc/tssdcard.ko /mnt/sd
cp ./drivers/serial/tsuart1.ko /mnt/sd/
cp ./drivers/serial/tsuart7800.ko /mnt/sd/
cp ./drivers/usb/core/usbcore.ko /mnt/sd/
cp ./drivers/usb/host/ehci-hcd.ko /mnt/sd/

umount /mnt/sd && sync && sync

To install the modules in the Debian partition:

mkdir newmodules
INSTALL_MOD_PATH=newmodules make modules_install

# Again, your device may be something different.  Check 'dmesg' to get the correct name.  On my system, this is /dev/sdg.
mount /dev/sdg4 /mnt/sd

# Remove the old modules
rm -rf /mnt/sd/lib/modules/2.6.21-ts/

# Install the new modules
cp -r newmodules/lib/ /mnt/sd/

umount /mnt/sd && sync && sync

Once you boot up to the board to Debian, you need to run 'depmod' once to calculate module dependencies. This will not work from the fastboot as it cannot write to this directory. After this is run, you can 'modprobe <module>' for your specific device support.

While we strongly recommend the 2.6.21 kernel we also provide a 2.6.34 kernel sources here. Note that these are not provided with any support. You can follow the same steps as above for using this kernel, making sure that you use the updated #ATAGS, the different sources, and using this toolchain instead.

ATAGS

During the initial release of the board we used an internal ATAG identifier that the linux kernel would use to recognize the kernel. When we created the 2.6.36 kernel we had one officially registered with the mainline kernel. This is set in the MBR, so you will have to use the appropriate MBR with the ATAG for your kernel or the kernel will not recognize the board.

Kernel 2.6.21 MBR

Kernel 2.6.36 (and above) MBR

In our official images these will already be written, but you can simply use dd to write these to first 446 bytes of either of the SD cards or mtdcopy for onboard flash.

Software Development

Editors

Vim is a very common editor to use in Linux. While it isn't the most intuitive at a first glance, you can run 'vimtutor' to get a ~30 minute instruction on how to use this editor. Once you get past the initial learning curve it can make you very productive. You can find the vim documentation here.

Emacs is another very common editor. Similar to vim, it is difficult to learn but rewarding in productivity. You can find documentation on emacs here.

Nano while not as commonly used for development is the easiest. It doesn't have as many features to assist in code development, but is much simpler to begin using right away. If you've used 'edit' on Windows/DOS, this will be very familiar. You can find nano documentation here.

Compilers

We only recommend the gnu compiler collection. There are many other commercial compilers which can also be used, but will not be supported by us. You can install gcc on most boards in Debian by simply running 'apt-get update && apt-get install build-essential'. This will include everything needed for standard development in c/c++.

You can find the gcc documentation here. You can find a simple hello world tutorial for c++ with gcc here.

Build tools

When developing your application typing out the compiler commands with all of your arguments would take forever. The most common way to handle these build systems is using a make file. This lets you define your project sources, libraries, linking, and desired targets. You can read more about makefiles here.

If you are building an application intended to be more portable than on this one system, you can also look into the automake tools which are intended to help make that easier. You can find an introduction to the autotools here.

Cmake is another alternative which generates a makefile. This is generally simpler than using automake, but is not as mature as the automake tools. You can find a tutorial here.

Debuggers

Linux has a few tools which are very helpful for debugging code. The first of which is gdb (part of the gnu compiler collection). This lets you run your code with breakpoints, get backgraces, step forward or backward, and pick apart memory while your application executes. You can find documentation on gdb here.

Strace will allow you to watch how your application interacts with the running kernel which can be useful for diagnostics. You can find the manual page here.

Ltrace will do the same thing with any generic library. You can find the manual page here.

Upgrading the Linux Distribution

OABI Lenny

The shipped configuration of the TS-7800 has the OABI version of Debian Sarge. The last OABI-supported Debian version is Lenny, and can be reached with these instructions:

apt-get update
apt-get upgrade

The update and upgrade may require running multiple times. Once they report completely up to date you will need to modify /etc/apt/sources.list to look for Lenny distributions. The repository may change over time, but the entry will look something like this:

#file /etc/apt/sources.list
deb http://ftp.debian.org/debian lenny main contrib non-free

Once the sources.list file is updated appropriately, running the above apt-get commands again (potentially more than once) will complete the update to Debian Lenny.

EABI Lenny

Since OABI and EABI are incompatible, the only way to switch to EABI Lenny is to actually replace the entire root filesystem on the TS-7800 with the EABI Debian Lenny already intact. The filesystem tarball can be found on the Technologic Systems FTP here:
ftp://oz.embeddedarm.com/ts-arm-sbc/ts-7800-linux/distributions/debian-lenny-eabi-armel-512MB-mar032009.tar.gz
This tarball should be used to replace the existing root filesystem. Once that is done, the TS-7800 will boot to EABI Debian Lenny.

CPU Functionality

The TS-7800 features a Marvell 88F5182. You may want to refer to the CPU user guide for more details on the advanced usage of the CPU features.

MMU

The 88F5182 features a Memory Management Unit, enabling high level operating systems such as Embedded Linux and Windows CE to run on the TS-7800. In the same way, the Linux TS-Kernel takes advantage of the MMU functionality. The MMU is controlled by page tables stored in system memory and is responsible for virtual address to physical address translation, memory protection through access permissions and domains, MMU cache and write buffer access. In doing so, software applications can access larger "virtual" memory space than the available physical memory size, allowing multiple programs to run and use the system memory simultaneously.

Interrupts

The 88F5182 has 64 interrupts available on chip as well as another 32 implemented in the Lattice FPGA by using the doorbell interrupt register. The CPU also has 26 GPIO pins that are configurable for interrupt use. The 88F5182 includes an interrupt controller that routes internal interrupt requests as well as external interrupt requests (GPIOs) to the Feroceon CPU core. The 88F5182 interrupt controller drives two interrupt signals to the Feroceon CPU core -- FIQ (high priority) and IRQ (regular priority). All interrupts are level sensitive. The interrupt is kept active as long as there is at least one non-masked cause bit set in the Interrupt Cause register. The 88F5182 can also be used as the interrupt controller for external devices generating interrupts to the Feroceon CPU core via GPIO inputs.

The interrupt controller can also receive interrupt messages from an external PCI Express device. The 88F5182 can also act as a PCI or PCI Express Endpoint. As such, it can generate the PCI Express INTA emulation message or the INTAn signal.

For more information about the interrupt functionalities, refer to the 88F5182 User's Guide.

Onboard Flash

The TS-7800 uses a 512MB NAND Flash chip for its on-board Flash resource. The physical address of the Flash chip is 0xe800_0800. The on-board flash is broken up into partitions and accessed through the Linux driver framework known as "MTD", or Memory Technology Device. The partitioning is dynamic and depends on the DOS-style MBR found at sector 0 of the flash. This MBR can be changed by using the "fdisk" command on the /dev/mtdblock/0 device, but doing so is not recommended.

USB Host

The USB Connector on the TS-7800 provide two high-speed USB interfaces for the user. These are directly connected to the MV88F5182 processor, which integrates an USB dual-port Open Host Controller Interface (OHCI), providing full-speed serial communications ports at a baud rate of 480 Mbits/sec. Up to 127 USB devices (printer, mouse, camera, keyboard, etc.) and USB hubs can be connected to the USB host in the USB "tiered-star" topology. This includes the following features: USB 2.0 compatible OHCI Rev 1.0 compliant USB device connections support at both low-speed (1.5 Mbps) full-speed (12 Mbps) and hi-speed (480 Mbps) Root HUB integrated with 2 downstream USB ports Transceiver buffers integrated, over-current protection on ports Supports power management Operates as a master on the bus

Additional non-volatile storage may be added with a USB flash drive. This device supplies additional non-volatile storage either for data or for a complete operation system distribution, such as Debian. A tar-file of Debian is available on the Technologic Systems FTP site.

SATA

The CPU provdes two Marvell SATA connections. These allow connection of mass storage devices in excess of 500GB. The drivers required to operate the SATA connectors in Sarge are thus: mv_sata, sd_mod, scsi_mod. Note while the TS-7800 cannot boot directly from a SATA device, chroot and pivot root can be used to change the root partition to one of these devices.

FPGA Functionality

Register Map

By default the Lattice FPGA on the TS-7800 is loaded with a system controller core at base physical address 0xe8000000. Add that base to the offsets below to access these registers. With the exception of the UART control registers, these registers are all 32 bits wide and should therefore be accessed with 32 bit writes. The UART registers are 16 bit registers.

{{| class=wikitable |- ! Offset ! Bits ! Access ! Description |- | rowspan=2 | 0x0 | 7-0 | Read Only | FPGA Revision |- | 31-8 | Read Only | Board ID: 0xb480 |- | rowspan=4 | 0x4 | 15-0 | Read/Write | DIO header data in pins 16-1 |- | 29-16 | Read/Write | LCD header data in pins 14-1 |- | 30 | Read Only | JP1 status (1 = on) |- | 31 | Read Only | JP2 status (1 = on) |- | rowspan=6 | 0xc | 12-0 | Read/Write | PC104 Configuration |- | 13 | Read/Write | UART RTS for COM1 |- | 14 | Read/Write | UART DTR for COM1 |- | 15 | Read/Write | 1 = RS422 on COM2 using TSUART2 2 = dual RS485 using TSUART2 and TSUART3 |- | 16 | Read/Write | UART4 RTS on COM3 |- | 31-17 | Read Only | Reserved |- | 0x10 | 31-0 | Read/Write | PC104 row A GPIO data |- | 0x14 | 31-0 | Read/Write | PC104 row B GPIO data |- | rowspan=2 | 0x18 | 19-0 | Read/Write | PC104 row C GPIO data |- | 31-20 | Read Only | Reserved |- | 0x20 | 31-0 | Read/Write | PC104 row A GPIO data direction |- | 0x24 | 31-0 | Read/Write | PC104 row B GPIO data direction |- | rowspan=2 | 0x28 | 19-0 | Read/Write | PC104 row C GPIO data direction |- | 31-20 | Read Only | Reserved |- | rowspan=2 | 0x2c | 19-0 | Reda/Write | PC104 row D GPIO data direction |- | 31-20 | Read Only | Reserved |- | 0x30 | 31-0 | Read/Write | PC104 row A MUX function |- | 0x34 | 31-0 | Read/Write | PC104 row B MUX function |- | rowspan=2 | 0x38 | 19-0 | Read/Write | PC104 row C MUX function |- | 31-20 | Read Only | Reserved |- | rowspan=2 | 0x3c | 19-0 | Read/Write | PC104 row D MUX function |- | 31-20 | Read Only | Reserved |- | 0x40 | 31-0 | Read Only | Free running microsecond counter |- | 0x44 | 31-0 | Read Only | 32 bits of random data updated every second |- | 0xC0-0xE6 | 15-0 | Read/Write | TSUART control registers |}

TSUART

(this section is under construction)

PC104

To access peripherals on the PC104 bus it is necessary to add the base address from the table below to the offset of the peripheral to get a memory address for accessing the peripheral. For example, for ISA 8-bit I/O address 0x100, add 0xEE000000 to 0x100 to get 0xEE000100.

Memory I/O
8-bit 0xEC000000 0xEE000000
16-bit 0xED000000 0xEF000000

The IRQs on the PC104 bus from the TS-7800 are 64 + the PC104 IRQ number. These will be IRQs 69, 70, and 71.

WARNING: The Ethernet connector and the electrolytic capacitor near the PC/104 bus are near the edge of the PC/104 specification. It is advised to apply a piece of electrical tape on top of these components when using a PC/104 daughter board to help prevent any damage.

The TS-7800 provides control over some of the ISA parameters of the PC-104 bus through a 32-bit register located at address 0xE800000C, which is defined as follows:

Bit(s) Function
5-0 ISA strobe length
9-6 ISA setup length
10 Honor ISA 0WS/ENDX signal (1=true)
11 TS special ISA pinout enable (1=true)
12 ISA oscillator select
Value Function
0 high-jitter approximation of 14.318Mhz
1 clean 25Mhz

(Other bits in this register should be masked out.)

The ISA strobe length and ISA setup length are both given as the number of extra 10ns periods.

The ISA strobe length is the amount of additional time that ISA_IOR, ISA_IOW, ISA_MEMR, and ISA_MEMW are held asserted. The minimum (when bits are zero) is 20ns. The default power-on value is 40, for a 420ns strobe length. If configured to honor the ISA 0WS/ENDX signal, the peripheral will skip the remaining strobe time for an early transaction end, allowing for faster devices than standard ISA allows.

The ISA setup length is the additional amount of time above 20ns that the address and data are held stable before asserting the strobe. The default is 14 (160ns).

There is an additional 20ns hold time at the end of the strobe where address and data are kept valid. The default total bus cycle length is then 160ns (setup) plus 420ns (strobe) plus 20ns (hold) for a total of 500ns (2Mhz). This is very conservative for modern hardware and most designs can actually run much faster.

The TS special ISA pinout is designed to enable compatibility with products from TS that use the 16-bit bus on the 64-pin PC/104 header. For example the TS-ETH2 is a 16-bit peripheral that has a jumper labeled "ARM." When this jumper is shorted it will expect to use the TS special ISA pinout, if it is left open it will expect to use standard PC/104 16-bit pinout. Please note that disabling the special pinout is generally not required as both 8 and 16-bit bus cycles will still function normally when it is enabled. Disabling the special ISA mode will result in quirky behavior that may show double read strobes.

PC104 16550

Many of our PC104 peripherals interface with the TS-7800 using a 16550 UART. To connect to these devices we provide a generic driver. In this example, I'm using a TS-SER4 with jumpers IRQ2 and IRQ4 on.

pc104on
modprobe ts7800_isa16550 irq=6 io=0x3e8

# On the TS-SER4, we have multiple 16550 devices.  To use
# these, you must remove the module and reinsert it with the
# options for the next port.  This will not remove the /dev/ entry for the original
# device, and to actually remove it you must reboot the board.
rmmod ts7800_isa16550
modprobe ts7800_isa16550 irq=6 io=0x2e8

After loading each driver, dmesg will indicate the new device name:

 serial8250: **ttyS2** at MMIO 0xee0003e8 (irq = 70) is a 16550A

PC104 Header

The PC-104 connector consists of pins in four rows labeled A, B, C, and D. The numbering of the pins in each row is shown below:

D 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
C 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
A 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
B 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

The PC-104 connector can be multiplexed between different functionalities including ISA bus and GPIO. The power-up default is GPIO mode, with all I/Os in a neutral state. To enable the PC-104 bus (ISA) signals, it is necessary to write the following values to the registers specified:

 0x55555555 to address 0xE8000030
 0x55555555 to address 0xE8000034
 0x55555 to address 0xE8000038
 0x55555 to address 0xE800003C

More specifically, the functionality of the PC-104 connector can be configured in a more fine-grained manner, two pins at a time. Each pin pair will have one of four functions:

Value Description
0 GPIO
1 ISA
2 Reserved
3 Reserved

Setting the function of each pair of pins is done by writing the function number to the appropriate pair of bits in the register corresponding to the row in question. The table below shows the bit positions in each register on the top row, while the cells below in the same column give the corresponding pin numbers for each row which are programmed with those bits at the specified register address.

Row Register bits 31-30 29-28 27-26 25-24 23-22 21-20 19-28 17-16 15-14 13-12 11-10 09-08 07-06 05-04 03-02 01-00
A 0xE8000030 32-31 30-29 28-27 26-25 24-23 22-21 20-19 18-17 16-15 14-13 12-11 10-09 08-07 06-05 04-03 02-01
B 0xE8000034 32-31 30-29 28-27 26-25 24-23 22-21 20-19 18-17 16-15 14-13 12-11 10-09 08-07 06-05 04-03 02-01
C 0xE8000038 19-28 17-16 15-14 13-12 11-10 09-08 07-06 05-04 03-02 01-00
D 0xE800003C 19-28 17-16 15-14 13-12 11-10 09-08 07-06 05-04 03-02 01-00

For example, to set the function of pins B19 and B20, this the table above indicates to use bits [19:18] of the register at address 0xE8000034.

The function of the PC-104 connector pins are given in the table below. The "ISA" column gives the name of the pin signal when it is configured as ISA, while the "GPIO" column gives the name of the pin signal when it is configured as GPIO. To save space, there are two sets of columns in each table, whereby the pin name is listed first, followed by the ISA signal and then the GPIO signal, and then this order is repeated for the other set of pins on the same physical header.

The 64-pin connector is given first:

Pin ISA GPIO Pin ISA GPIO
A1 IOCHK# A[0] B1 GND GND
A2 D7 A[1] B2 RESET B[1]
A3 D6 A[2] B3 +5V +5V
A4 D5 A[3] B4 IRQ9 B[3]
A5 D4 A[4] B5 3.3V 3.3V
A6 D3 A[5] B6 DRQ2 B[5]
A7 D2 A[6] B7 NC B[6]
A8 D1 A[7] B8 ENDX# B[7]
A9 D0 A[8] B9 8V_30V 8V_30V
A10 IORDY A[9] B10 GND GND
A11 AEN A[10] B11 MEMW# B[10]
A12 A19 A[11] B12 MEMR# B[11]
A13 A18 A[12] B13 IOW# B[12]
A14 A17 A[13] B14 IOR# B[13]
A15 A16 A[14] B15 DACK3# B[14]
A16 A15 A[15] B16 DRQ3 B[15]
A17 A14 A[16] B17 DACK1# B[16]
A18 A13 A[17] B18 DRQ1 B[17]
A19 A12 A[18] B19 RFRSH# B[18]
A20 A11 A[19] B20 BCLK B[19]
A21 A10 A[20] B21 IRQ7 B[20]
A22 A9 A[21] B22 IRQ6 B[21]
A23 A8 A[22] B23 IRQ5 B[22]
A24 A7 A[23] B24 IRQ4 B[23]
A25 A6 A[24] B25 IRQ3 B[24]
A26 A5 A[25] B26 DACK2# B[25]
A27 A4 A[26] B27 TC B[26]
A28 A3 A[27] B28 BALE B[27]
A29 A2 A[28] B29 +5V +5V
A30 A1 A[29] B30 OSC B[29]
A31 A0 A[30] B31 GND GND
A32 GND GND B32 ISA_B32 B[31]

Here are the pin assignments for the 40-pin connector:

Pin ISA GPIO Pin ISA GPIO
C0 GND GND D0 GND GND
C1 SBHE# C[1] D1 MEM16# D[1]
C2 LA23 C[2] D2 IO16# D[2]
C3 LA22 C[3] D3 IRQ10 D[3]
C4 LA21 C[4] D4 IRQ11 D[4]
C5 LA20 C[5] D5 IRQ12 D[5]
C6 LA19 C[6] D6 IRQ15 D[6]
C7 LA18 C[7] D7 IRQ14 D[7]
C8 LA17 C[8] D8 3.3V 3.3V
C9 MEMR# C[9] D9 DRQ0 D[9]
C10 MEMW# C[10] D10 DACK5# D[10]
C11 SD8 C[11] D11 DRQ5 D[11]
C12 SD9 C[12] D12 DACK6# D[12]
C13 SD10 C[13] D13 DRQ6 D[13]
C14 SD11 C[14] D14 DACK7# D[14]
C15 SD12 C[15] D15 DRQ7 D[15]
C16 SD13 C[16] D16 +5V +5V
C17 SD14 C[17] D17 MASTER# D[17]
C18 SD15 C[18] D18 GND GND
C19 GND GND D19 GND GND
Note: The GPIO nomenclature in these tables is such that, for example, "A[0]" means "Bit 0 of GPIO Register A", and in general "X[n]" means "Bit n of GPIO Register X" and "X[n:m]" means "Bits n through m of GPIO register X", where X is one of A, B, C, or D.

AVR Functionality

Sleep Mode

The TS-7800 implements a sleep mode that allows the board to go down to 200 microamps. This powers off the TS-7800 while the AVR waits for the specified time to wake up the board. You can sleep for 5 seconds by running this:

ts7800ctl -s 5

This only allows the board to sleep for seconds, not smaller units of time. You can however wake it up immediately from an external interface by driving DIO_04 or ISA_B32 high.

This sleep functionality will only work if power is fed in through the +5V connector on the TS-7800 itself. If you are using a PC104 device like the TS-POE100 or the TS-BAT10 then you would have to cut the +5V pins on PC104 and bring it down to the TS-7800 power connector in order to use the sleep functionality. Otherwise the board can be powered through PC104 with no modification.

ADC Sampling

WARNING: If you ordered your board before 09/2011 then you may want to update the AVR. See [Product Errata].

The ADC is implemented using ts7800ctl:

root@ts7800:root# ts7800ctl -S 0,1
[0x00000000, 0]=1023
[0x00000001, 1]=0810
[0x00000002, 0]=1023
[0x00000003, 1]=1023
[0x00000004, 0]=1023
[0x00000005, 1]=1023

This requests ts7800ctl to output ADC in string data. This returns:

 [Hex counter, Channel]=Value

If you prefer to implement this in your own code, you can get [ts7800ctl.c here].

Product Notes

FCC Advisory

This equipment generates, uses, and can radiate radio frequency energy and if not installed and used properly (that is, in strict accordance with the manufacturer's instructions), may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class A digital device in accordance with the specifications in Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of this equipment in a residential area is likely to cause interference, in which case the owner will be required to correct the interference at his own expense.

If this equipment does cause interference, which can be determined by turning the unit on and off, the user is encouraged to try the following measures to correct the interference:

Reorient the receiving antenna. Relocate the unit with respect to the receiver. Plug the unit into a different outlet so that the unit and receiver are on different branch circuits. Ensure that mounting screws and connector attachment screws are tightly secured. Ensure that good quality, shielded, and grounded cables are used for all data communications. If necessary, the user should consult the dealer or an experienced radio/television technician for additional suggestions. The following booklets prepared by the Federal Communications Commission (FCC) may also prove helpful:

How to Identify and Resolve Radio-TV Interference Problems (Stock No. 004-000-000345-4) Interface Handbook (Stock No. 004-000-004505-7) These booklets may be purchased from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.

Limited Warranty

See our Terms and Conditions for more details.