|
Documentation from November-2009
Table of Contents
This manual is intended to provide the user with an overview of the board and benefits,
complete features specifications, and set up procedures. It contains important safety
information as well.
To help our customers make the most of our products, we are continually making additional and updated resources available on the Technologic Systems website (www.embeddedARM.com).
These include manuals, application notes, programming examples, and updated software and firmware. Check in periodically to see what's new!
When we are prioritizing work on these updated resources, feedback from customers (and prospective customers) is the number one influence. If you have questions, comments, or concerns about your Embedded Computer, please let us know at support@embeddedARM.com.
Technologic Systems warrants this product to be free of defects in material and workmanship for a period of one year from date of purchase. During this warranty period Technologic Systems will repair or replace the defective unit in accordance with the following process:
A copy of the original invoice must be included when returning the defective unit to Technologic Systems, Inc.
This limited warranty does not cover damages resulting from lightning or other power surges, misuse, abuse, abnormal conditions of operation, or attempts to alter or modify the function of the product.
This warranty is limited to the repair or replacement of the defective unit. In no event shall Technologic Systems be liable or responsible for any loss or damages, including but not limited to any lost profits, incidental or consequential damages, loss of business, or anticipatory profits arising from the use or inability to use this product.
Repairs made after the expiration of the warranty period are subject to a repair charge and the cost of return shipping. Please, contact Technologic Systems to arrange for any repair service and to obtain repair charge information.
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 computing device in accordance with the specifications in Subpart J of 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.
The TS-7300 series Single Board Computers (SBC's) run on a 200MHz ARM9 processor with power as low as 2 Watts. The TS-7300 series SBC's are available in many configurations, most of which are Commercial off the shelf (COTS) and available to ship today. The TS-7300 series SBCs are compact, full-featured Single Board Computers (SBC) based upon the Cirrus EP9302 200MHz ARM9 CPU, which provides a standard set of on-board peripherals such as 10/100 ethernet, and dual USB, SD Card socket, digital I/O lines, temperature sensor, real time clock, and more. For technical information on these functions please refer to the Cirrus user manual.
Even with the standard power consumption of 2 Watts, the TS-7300 SBCs run without fans or heat sinks in the temperature range of -20° to +70°C. Extended Temperature -40° to +85°C is also standard, but CPU clock must be decreased to about 166MHz for higher temperatures. Digital Signal Processing (DSP) is enabled through a standard 5 channel, 12bit A/D converter, 55+ DIO lines and 10 standard serial ports.
The TS-7350 is a RoHS compliant Single Board Computer (SBC) based on a Cirrus EP9302 200MHz ARM9 CPU, which provides a standard set of on-board peripherals such as 10/100 ethernet, USB, SD Card socket, digital I/O lines, temperature sensor, real time clock, and more. The TS-7350 features 32MB of SDRAM (64-128MB opt)
The TS-7350 features a 5,000 LUT on-board Lattice FPGA. The default FPGA load provides additional peripherals, such as SD Card socket and serial ports. A video core is not included in the default load. In addition, the FPGA can be configured on the fly to either load a 16-bit PC/104 bus on the 64-pin PC/104 connector or use it as general purpose I/O lines.
Most of the PC/104 pins are connected straight to the FPGA, giving the TS-7350 the flexibility to add external hardware and physical/transceiver layers. The default TS-7350 FPGA load provides a standard PC/104 bus on the 104-pin connectors, maintaining compatibility with our other ARM SBCs and wide range of PC/104 peripheral boards. The FPGA on the TS-7350 enables simple, inexpensive customization that requires no physical hardware modifications. Should you need a special configuration or a custom load, contact Technologic Systems for FPGA development services.
Out-of-the-Box Productivity
Technologic Systems Linux products get you to your application quickly. Our Single Board Computers boot directly to Linux as shipped. There is no complicated CMOS setup or configuring of a Linux derivative Operating System to source, define, and load. The TS-7350's user can power up the board and immediately begin application development.
Of course, should you wish to configure your own version of Linux or use a different operating system, this is easy too. Technologic Systems provides the solution to fast application development without tedious OS configuration.
Impressive Performance
The ARM920T's 32-bit architecture, with a five-stage pipeline, delivers very impressive performance at very low power. The EP9302 CPU has a 16 KB instruction cache and a 16 KB data cache to provide zero-cycle latency to the current program and data, or they can be locked to guarantee no-latency access to critical sections of instructions and data. For applications with instruction-memory size restrictions, the ARM920Ts compressed Thumb instruction set can be used to provide higher code density and lower Flash storage requirements.
As a benchmark, the TS-7300's CPU integer performance, at a supplied 200 MHz, is about twice as fast as the Technologic Systems 133MHz 586-based products.
The TS-7350 comes standard with these features:
- 200MHz ARM9 CPU
- 32MB SDRAM (64-128MB opt)
- 5K LUT FPGA
- Flexible 64-pin FPGA-PC/104 connector
- 8MB RAM Framebuffer, no video core
- Able to drive TFT-LCDs via custom FPGA
- 1 10/100 ethernet port
- 2 USB 2.0 (12Mbit/s max)
- 1 SD Card slot (up to 6MB/s DMA)
- 3 RS-232, 2 RS-485 (Optional), 2 TTL COM ports
- 40-pin header with DIO,I2C,SPI,ADC,Console UART
- Optional Temp Sensor, RTC, RS-485
- Fanless -40° to +70°C, +85°C 166Mhz
- 5-28VDC Power Input
- Boots Linux 2.6 in about 1.24 seconds
- Debian Linux is default on SD Card
- Requires TS-9445 peripheral for Console
- Supports out-of-the-box Eclipse IDE
The TS-7350 can be configured for your application using the following available on-board options and external accessories:
On-Board Options
- TS-7350-yyy: TS-7350 with up to 128 MB of on-board SDRAM. For example, TS-7350-64 selects model TS-7350 with 64 MB of SDRAM.
- OP-BBRTC: on-board sealed-battery backed RTC
- OP-TMPSENSE: High-precision temperature sensor
- OP-485-FD: RS-485 full duplex interface on COM2
- OP-485-HD: RS-485 half duplex interface on COM2
- OP-ROHS: RoHS directive compliant built board
NOTE:
The TS-7350 SBC can be built compliant with the RoHS (Restriction of Hazardous Substances ) Directive. Contact Technologic Systems for RoHS support.
External Accessories
- SD-2GB-USB-LCDR: TS-LCD-READY bootable 2GB SD card with USB reader interface including recovery mechanism, out-of-the-box ECLIPSE IDE with debugging, ARM tool chain, Debian filesystem, Xorg, documentation and further binaries/utilities (supports TS-7350, TS-7370, TS-7390, (included in the KIT-LCDR) (an SD Card is required to boot)
- SD-512-LCDR : TS-LCD-READY bootable 512 MB SD card pre-installed with Debian Linux for ARM, Xorg and full tool chain (supports TS-7350, TS-7370, TS-7390, TS-7395) (an SD Card is required to boot)
- CB7-05: Null modem cable with a DB9F at each end (included in the KIT-LCDR)
- RC-DB9: 10-pin header COM port adapter cable to DB-9 (included in the KIT-LCDR)
- WIFI-G-USB: USB 802.11g wireless network interface
- TS-9445: Console Mini-Peripheral Board w/ 1 RC-DB9 cable (included in the KIT-LCDR)
- PS-18VDC-REG: International regulated 18VDC wall mounted power supply (compatible with enclosure)
- PS-5VDC-REG: International regulated 5VDC wall mounted Power Supply (incompatible with enclosure) (included in the KIT-LCDR)
In addition, a complete set of interfacing cables, connectors, and enclosures are available.
NOTE:
Check our website at www.embeddedARM.com for an updated list of options and external accessories
The TS-LCD-READY Development Kit for the TS-7350 Single Board Computer includes all equipment necessary to boot into the operating system of choice and start working. The development kit is highly recommended for a quick start on application development.
The TS-LCD-READY Development Kit includes:
- 2GB SD Card with USB interface which includes:
- Complete Debian Linux distribution for ARM
- GNU GCC C/C++ compiler with full tool-chain enabling native application development
- Hardware test routines source code and other example source code
- Debian package system: apt-get, tasksel, dselect
- ECLIPSE IDE
The development kit additionally includes:
- USB SD Card reader
- International regulated 5VDC wall mounted Power Supply (incompatible with enclosure)
- TS-9445 Console board
- DB9+DB25 NULL modem cable
- Adapter cable from 10-pin header to DB9
- Various cables for connection DIO, LCD, Keypad, etc.
- Utility Media (CD, USB Flash or SD Card, depending on the board) with complete source, manuals, example code, etc.
- Printed supporting documentation for TS-7350 Hardware, Linux for ARM and Development Kit.
NOTE:
Single board computer is not included in the Development Kit (sold separately).
The TS-ENC720 metal enclosure is made to house the TS-7200, TS-7250, TS-7260, TS-7350, TS-7370 or TS-7800 Single Board Computer and two PC/104 peripheral boards.* The switching power regulator efficiently converts 8-30 VDC input (8-38 VDC for the TS-7800) into regulated +5 VDC required by the SBC.
For further information on this product, please contact Technologic Systems or refer to the manual.
NOTE:
The TS-DIO64 and the TS-9700 with the DAC option both have connectors that do not fit into the TS-ENC720.
Technologic Systems provides:
- Free system software and documentation updates available on our web site
- Free technical support by phone, fax, or email
- 30-day, money back guarantee on evaluation units
- One-year, full warranty
- Linux OS Support
The ARM processor (the EP9302) comes from Cirrus and the platform is very similar to the Cirrus EDB9302 evaluation board. Cirrus 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 NAND and NOR Flash chips (via mtd drivers), a compact flash IDE driver, A/D converters, SD Card through the TS-SDCORE, video, additional ethernet ports and more. If you want to use Linux and aren't tied to the x86 architecture, the TS-7350 can be very cost-effective.
The TS-7350 SBC's proprietary boot firmware makes it possible for the board to boot directly from the SD Card, therefore the TS-7350's are shipped standard with the full-featured Debian Linux installed on the first SD Card (the SD card is required in order to bootup). Debian can also be used with an NFS root file system or USB flash drives. The TS-Kernel used is based upon the version 2.6.21, patched and compiled for the Cirrus EP9302 ARM920T processor. The EP3902 is Real-Time capable through the use of RTAI, please contact Technologic Systems for information about using RTAI in your application.
The root file system used by the Linux OS can be any of the following:
- JFS file system image on the fourth partition of an SD card
- NFS root, via Ethernet port(after fast bootup, one need to mount a NFS root and chroot to it)
Before performing any set up or placement procedures, take the precautions outlined in this section.
Handling the Board Safely
Be sure to take appropriate Electrostatic Discharge (ESD) precautions. Disconnect the power source before moving, cabling, or performing any set up procedures.
WARNING:Inappropriate handling may cause damage to the board.
Setup and Installation Instructions
Follow these guidelines for safety and maximum product performance:
- Observe local health and safety requirements and guidelines for manual material handling
Setup Tools
Depending on placement and cabling, you may need the following tools:
- Small flat-blade screwdriver
- Small Phillips screwdriver
Setup Procedure
After locating, setting up, grounding, and cabling the TS-7350:
- Apply power
- Monitor the TS-7350 using a terminal emulator to verify that the board is operating properly
NOTE:
Your board might include a screw power connector on the power input. Notice this connector is removable. Please pull this connectior off before applying power.
Disconnecting AC Power
- Unplug from the power source.
- Disconnect other cables as required.
The TS-7350 boot mechanism requires a bootable SD card. If you did not purchase an SD card with your board, you can create a factory SD card using any 512MB or larger SD card. An SD card image is available
here.
When power is applied with the SD card inserted, the default boot behavior is fastboot, which provides a busybox prompt in under 2 seconds. When this shell is exited the board continues on to perform a full Debian boot. This behavior is controlled by the linuxrc script, which by default is a symbolic link to linuxrc-fastboot. To automatically boot full Debian, link it instead to linuxrc-sdroot. Please note that changes made to files on the initial ramdisk are saved only in RAM. To save your changes permanently, type "save" at the fastboot prompt.
An ANSI terminal or a PC running a terminal emulator is required to communicate with your TS-7350 computer. Simply Attach the TS-9445 (these are included in the TS-LCD-READY Development Kit) to the JTAG header on the TS-7350, connect the 10 pin header COM adapter to the TS-9445, and use that to connect to your development PC with a DB9 cable using serial parameters of 115,200 baud, 8 data bits, no parity, no flow control, 1 stop bit (8N1). If you are running Linux, the minicom program works well, Windows XP users can run the Hyperterm application, and Windows Vista users can download and run PuTTy. Technologic Systems offers a null modem cable with both 25 pin and 9 pin connectors at each end as part number CB7-05.
Connect a regulated 5-28VDC, (1A minimum) power source on the power input connector. Please note the polarity printed on the board. The boot messages, by default, are all displayed on COM1 at 115200 baud. The board will also answer telnet connections to IP address 192.168.0.50.
The TS-7350 board has Linux installed by default on the SD card. Upon bootup, The board will boot within 1.24 seconds to a Linux prompt on UART #0 (/dev/ttyAM0).
The default fastboot shell has available several standard Linux commands through the "busybox" program. Technologic Systems has made several modifications to the busybox source code to keep bootup as fast and simple as possible. The modified source code is available to Technologic Systems customers.
Upon bootup, you should see out of your serial port when booting from a properly formatted SD card:
>> TS-BOOTROM - built Sep 27 2006
>> Copyright (c) 2007, Technologic Systems
>> Booting from SD card...
.
.
.
.
Finished booting in 1.24 seconds
Type 'tshelp' for help
/#
At this point, if you type 'exit' from the serial shell, the TS-7350 will then attempt a full Debian Linux bootup from the inserted SD card using partition #4 as the root file system. This version of Linux, an embedded version of Debian Linux, contains Apache, SSH, PPP, and FTP server and many other common utilities and libraries. Other community-supported embedded Linux distributions are available. For instance, the "Buildroot" project at http://buildroot.uclibc.org/ allows one to easily build custom filesystems and cross-toolchains.
Should the need arise to automatically bypass the fastboot and proceed directly into starting the SD card version of Linux, you can do so with the following command issued to the fastboot shell:
ln -sf /linuxrc-sdroot /linuxrc; save
To automatically boot from onboard flash the command is (NOT APPLICABLE TO TS-7350/70):
ln -sf /linuxrc-mtdroot /linuxrc; save
To automatically boot from USB flash dongle or USB hard drive:
The "check-usb-update" utility provides this feature and is included in the linuxrc files by default.
To get back to the fastboot shell at the next boot up, place the file "/fastboot" in the root directory of the filesystem:
touch /fastboot
The '/linuxrc' file is a shell script that is the very first thing run by the kernel on startup. Several sample startup scripts are included and can either be used directly ("ln -sf /linuxrc-XXX /linuxrc" command) or modified to include custom bootup logic. These shell scripts were designed to be as fast and simple as possible (approximately 45 lines of code) for easy customer modifications. It is anticipated that this shell script be modified from the default to implement things in the customer's product such as backup configurations, software field updates, conditional booting/verification of SD cards, etc. Technologic Systems professional services are available should you need help in implementing a specific feature.
If you botch a modification during devlopment on the TS-7350 it is easy to recover it to a previous or factory state. On a host PC running Linux, you can use an SD card reader to mount the SD card and modify the files to work correctly. In order to mount the fourth partition which contains the Debian root filesystem, the host Linux machine will need the "jfsutils" package which can be installed using
apt-get install jfsutils
on a Debian based system. If the filesystem becomes corrupted, issuing the command
jfs_fsck -f -v /dev/sdb4
will clean the filesystem (assuming /dev/sdb is the device where the SD card is located). Refer to the SD Card Features section for information on the SD card partitions. Alternatively, you may also restore the SD card to the state in which you recieved it. First, a properly formatted SD card must be created, the latest image can be downloaded from ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7350-linux/binaries/ts-images/512mbsd-latest.dd.bz2 Please note that this image does not contain the Eclipse IDE that is distributed with 2GB cards from Technologic Systems. Once the image has been downloaded it can be copied to the SD card with the following command (assuming /dev/sdb is the device where the SD card is located).
bzcat 512mbsd-latest.dd.bz2 | dd of=/dev/sdb
or
bunzip2 512mbsd-latest.dd.bz2
dd if=512mbsd-latest.dd of=/dev/sdb
Power on the TS-7350 which will then boot from SD. Within a few seconds the board will have booted to a fastboot prompt from the SD card. Type "exit" to boot to the SD card version of Linux.
After booting in about 1.24 seconds, the TS-7350 presents a Linux shell on the serial console. Standard Linux utilities are provided by the busybox program. Type 'help' for a list of provided utilities. Source code for the busybox utility is available on the Technologic Systems FTP site.
A shell subroutine file, ts7000.subr, will be in the root directory. This file is executed at startup and defines several convenient functions. Type 'tshelp' for a list of these features. This can be used from within the Debian environment as well by exporting it with the command ". /initrd/ts7000.subr"
In addition, the following utility programs are installed on the TS-7350 by default:
- The save command will save the current initial ramdisk filesystem to the SD card partition 3. If you do not use the save command, then any changes made to the filesystem will not be permanent.
- The exit command will start full Linux boot or exit the telnet session.
- The createmtdroot command is useful for restoring a bricked TS-7800 or for cloning the software from one board to another. It erases the entire on-board flash, and then copies the kernel, initial ramdisk, and root filesystem from the SD card to the on-board flash. This assumes the board was booted from SD card. (NOT APPLICABLE TO THE TS-7350/70!)
- The createmtdboot command is like createmtdroot, but it copies only the kernel and initial ramdisk. It leaves partition 3 of the on-board flash intact. (NOT APPLICABLE TO THE TS-7350!)
- The sdmount command makes available executables on SD card at /mnt/root.
- The mtdmount command makes available NAND flash at /onboardflash directory (NOT APPLICABLE TO THE TS-7350/70!).
- The peekpoke utility can be used to directly access memory space. This is recommended for low level hardware debugging. The ts7000.subr file shows examples of usage.
- The ts7350ctl utility is used to change and read MAC address, change CPU clock speed, and provide basic memory information. See section 5.3 for more information.
Four methods are available for transferring files between a desktop PC and your TS-7350: Ethernet downloads, flash memory devices, Zmodem downloads, and NFS server. Full descriptions of each are detailed below. Other programs that use serial ports to transfer should work as well.
Transferring Files via the Ethernet Port
The default Linux root file system includes a small FTP server that can be used for uploading/downloading of files across an Ethernet network. Simply point your preferred FTP client to your TS-7350 IP address (default is 192.168.0.50). You can login as root or any valid user previously created from the useradd utility. By default, the TS-7350 will not accept anonymous FTP. With the 2GB SD card, a user named "eclipse" is present with password "eclipse".
Transferring Files via Flash Memory Device
An SD card or USB thumb drive can be used to easily move files from a host system. USB memory devices need no extra accessory to connect to the host PC. The flash memory devices can then be hot swapped (inserted or removed without rebooting the host PC). Mounting a USB drive on the TS-7350 in the Debian environment can be done using the command:
mkdir /mnt/usbdrive && mount /dev/sda1 /mnt/usbdrive
Mounting a USB drive on the TS-7350 in the Busybox environment can be done using
the following sequence of commands:
modprobe scsi_mod
modprobe sd_mod
modprobe ohci_hcd
modprobe usb_storage
modprobe usbserial
mdev -s
mount /dev/sda1 /mnt/host
Zmodem Downloads
Using the Zmodem protocol (not installed by default) to send files to and from the TS-7350 SBC is simple and straightforward. The only requirement is a terminal emulation program that supports Zmodem, and virtually all do. If you are using Windows 95 or later for your development work, the HyperTerminal accessory works well.
To download a file to the TS-7350 from your host PC, execute lrz at the Linux command line on the TS-7350 (while using console-redirection from within your terminal emulator) and begin the transfer with your terminal emulator. In HyperTerminal, this is 'Send File...' from the 'Transfer' menu.
To upload a file from the TS-7350 to your host PC, execute lsz [FILENAME] at the Linux command line on the TS-7350 and start the transfer in your terminal emulator. Many emulators, HyperTerminal among them, will automatically begin the transfer themselves.
Occasionally there may be errors in transmission due to background operations. This is not a problem -- Zmodem uses very accurate CRC checks to detect errors and simply resends bad data. Once the file transfer is complete the file is completely error free. For best results when using HyperTerminal, the hardware handshaking must be enabled in HyperTerminal.
NFS Server
Although this method can be a bit more involved, it's the fastest and easiest way to transfer files to and from a development PC. Basically, setup a development PC running Linux and set it up as an NFS server to share a directory (see online documentation for accomplishing this such as this one on sourceforge). Mount the NFS server on a folder on the SBC and transfer files to and from that folder. You can even work directly in the folder. The command to mount an NFS server would look similar to this:
mkdir /mnt/nfsshare && mount -t nfs -o nolock,vers=2 192.168.1.100:/share /mnt/nfsshare
Linux applications run in a protected and separate environment where they can do no damage to either the kernel or other applications running simultaneously. This protected environment does not allow arbitrary manipulation of hardware registers by default. Applications may be allowed temporary access through memory space windows granted by the mmap() system call applied to the /dev/mem device node. See example code for manipulating registers in the TS-7350 located at "ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7350-linux/samples".
When programming Linux applications that handle hardware devices on the TS-72XX, it is
important to understand the Memory Map of the EP9301 processor and additional
hardware features. Each hardware device or functional component has its reserved
memory address space, where the specific management registers are located.
Device drivers implementation is mostly reading and writing operations to specific memory
registers. This is accomplished from the Kernel space through straight access to the
physical memory. The resulting device driver provides high level procedures to the user
so that one is able to talk to the hardware without knowing memory map, bits and such.
Linux applications run in a protected and separate environment where they can do no
damage to either the kernel or other applications running simultaneously. This protected
environment does not allow arbitrary manipulation of hardware registers by default.
It is also possible to talk to hardware devices from user space. In doing so, one does not
have to be aware of the Linux Kernel development process. The special "/dev/mem" device implements a way to access the physical memory from the protected user space,
allowing readings and writings to any specific memory register. Applications may be
allowed temporary access through memory space windows granted by the mmap()
system call applied to the /dev/mem device node. For instance, to set up access to the
GPIO registers at 0x12c00000 on the TS-7200, the following snippet of C code is provided as an example:
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
{
int fd = open("/dev/mem", O_RDWR|O_SYNC);
char *gpioregs;
gpioregs = (char *)mmap(0, 4096, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0x12c00000);
gpioregs[0] = 0xff; /* directions register set to all outputs */
gpioregs[2] = 0x12; /* output 1 to DIO_01 & DIO_4, all else 0 */
}
An example program has been made available which demonstrates this principle by gathering data from the buffered inputs of the TS-7350 here:
getbufin.c
Some notes about the preceding code:
- Make sure to open using O_SYNC, otherwise you may get a cachable MMU mapping which unless you know what you're doing, probably is not what you want when dealing with hardware registers.
- mmap() must be called only on pagesize (4096 byte) boundaries and size must at least have pagesize granularity.
- mmap() of /dev/mem is only allowed for processes with UID 0 (root)
- More information on mmap() and open() system calls can be had by running "man mmap" or "man open" from most any Linux shell prompt.
- When working with char * types to registers, make sure to compile with the "-mcpu=arm9" option otherwise the wrong ARM opcodes will be used and your byte reads/writes may be turned into 32-bit reads and writes
Although working with the TS-7350 Linux is identical in most ways to working with a PC version Linux, one does need to be aware of some driver differences.
The SD card has a slightly different partition scheme to facilitate usage on a host PC. The SD card shows up as /dev/tssdcarda.
/dev/tssdcarda1 - First MBR partition
(Formatted FAT32, 2GB bought from Technologic Systems contains the Eclipse IDE)
/dev/tssdcarda2 - Second MBR partition (bootloader kernel binary)
/dev/tssdcarda3 - Third MBR partition (bootloader initrd)
/dev/tssdcarda4 - Fourth MBR partition (Linux JFS filesystem)
Note that the MBR installed by default on the TS-7350 contains a 446 byte bootloader program that loads the initial power-on kernel and initrd from the first and second partitions. Replacing it with a MBR found on a PC would not work as a PC MBR contains an x86 code bootup program.
The typical way of doing Linux development on the TS-7350 is actually on the board itself. Since the TS-7350 CPU is a PC-class processor in everything but power consumption and performance, it has no problem running real PC-class operating systems such as Linux. By running the full version of Linux (and not scaled-down microcontroller project OS's such as ucLinux), the TS-7350 can run the entire suite of applications contained in the Debian Linux distribution including the compilers. Since almost every open source program available for Linux is contained within the Debian Linux binary distribution, one rarely has to compile the large code-bases that would otherwise have forced integrators to a complicated cross-compilation environment due to the limited RAM/Mhz of the embedded computer. All too often, open-source projects do not anticipate the possibility of cross-compilation in their build systems, leaving issues for the system integrator to resolve.
The default SD card contains compilers and everything needed for developing applications in C, C++, PERL, PHP, and SH. Java, BASIC, TCL, Python and others are available for Debian, but not installed by default.
One can still use cross-compilers hosted on just about any platform if there is a specific need. Technologic systems includes binary versions of the popular Linux "crosstool" project at http://www.kegel.com/crosstool/ to allow cross-compiling on Windows/cygwin or a Linux/i386 PC on our website website.
apt-get
When using the Debian Linux file system, adding new packages and removing undesired ones is done all through Debian's package management. "apt", "dpkg", all behave as expected. With Debian, one can easily install and remove software packages. For a quick demonstration of how easy it is to remove and install programs with Debian, try the following commands:
apt-get update
apt-get install hexedit
hexedit /etc/passwd
^C (hit CTRL+C to safely exit)
apt-get remove hexedit
apt-get install installs a package name, while apt-get remove removes the named package. Visit the Debian home page for further information, since a full in-depth discussion on Debian is outside the scope of this document.
Logging In
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-7350 SBC running Linux. If you are new to Linux, www.debian.org is a good starting point for the Debian distribution.
Shutdown
Use the "shutdown -h now" command to halt the Linux system when running from SD or USB memory card to avoid corruption issues. The SD card is formatted with a journaled filesystem and are highly tolerant of improper shutdown sequences. The "shutdown" or "poweroff" commands are not required but still recommended.
General Linux Usage
For more information on using linux on the TS-7350, please refer to the Linux for ARM on TS-72XX guide on the Technologic Systems website.
CPU Overview
The Cirrus EP9302 features an advanced 200 MHz ARM920T processor design with a memory management unit (MMU) that allows support for high-level operating systems such as Linux, Windows CE, and other embedded operating systems. The ARM core operates from a 1.8 V supply, while the I/O operates at 3.3 V with power usage between 100 mW and 750 mW (dependent on speed). As a general-purpose processor, it provides a standard set of peripherals on board and a full set of Technologic Systems add-on peripherals via the standard PC/104 Bus. The ARM920T's 32-bit architecture, with a five-stage pipeline, consisting of fetch, decode, execute, memory, and write stages, delivers very impressive performance at very low power. The EP9302 CPU has a 16 KB instruction cache and a 16 KB data cache to provide zero-cycle latency to the current program and data, or they can be locked to guarantee no-latency access to critical sections of instructions and data. For applications with instruction-memory size restrictions, the ARM920Ts compressed Thumb instruction set can be used to provide higher code density and lower Flash storage requirements.
Cirrus EP9302 key features include:
- 200-MHz ARM920T Processor
- 16-kbyte Instruction Cache
- 16-kbyte Data Cache
- Linux®, Microsoft® Windows® CE-enabled MMU
- 100-MHz System Bus
- MaverickCrunch™ Math Engine
- Floating point, Integer and Signal Processing Instructions.
- Optimized for digital music compression and decompression algorithms.
- Hardware interlocks allow in-line coding.
- MaverickKey™ IDs
- 32-bit unique ID can be used for DRM-compliant, 128-bit random ID.
- Integrated Peripheral Interfaces
- 16-bit SDRAM Interface (up to 4 banks)
- 16-bit SRAM / FLASH / ROM
- Serial EEPROM Interface
- 1/10/100 Mbps Ethernet MAC
- Two UARTs
- Two-port USB 2.0 Full-speed Host (OHCI) (12 Mbits per second)
- IrDA Interface
- ADC
- Serial Peripheral Interface (SPI) Port
- 6-channel Serial Audio Interface (I2S)
- 2-channel, Low-cost Serial Audio Interface (AC'97)
- Internal Peripherals
- 12 Direct Memory Access (DMA) Channels
- Real-time Clock with Software Trim
- Dual PLL controls all clock domains.
- Watchdog Timer (SEE SECTION 4.4 Watchdog Timer)
- Two General-purpose 16-bit Timers
- One General-purpose 32-bit Timer
- One 40-bit Debug Timer
- Interrupt Controller
- Boot ROM
For further information on the Cirrus EP9302, refer to the Datasheet or User's Guide.
NOTE:
The EP9302 is identical silicon to the EP9301 except it is rated to run at 200 Mhz, instead of 166 Mhz. The available EP9301 User's Guide can still be used as the main reference manual.
MMU
The EP9032 features a Memory Management Unit, enabling high level operating systems such as Embedded Linux® and Windows® CE to run on the TS-7350. 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. For further information about the MMU functionalities, refer to the EP9302 User's Guide.
Interrupts
The EP9302 interrupt controller allows up to 54 interrupts to generate an Interrupt Request (IRQ) or Fast Interrupt Request (FIQ) signal to the processor core. Thirty-two hardware priority assignments are provided for assisting IRQ vectoring, and two levels are provided for FIQ vectoring. This allows time critical interrupts to be processed in the shortest time possible.
Internal interrupts may be programmed as active high or active low level sensitive inputs. GPIO pins programmed as interrupts may be programmed as active high level sensitive, active low level sensitive, rising edge triggered, falling edge triggered, or combined rising/falling edge triggered.
The EP9302 interrupt controller also includes the following features:
- Supports 54 interrupts from a variety of sources (such as UARTs, GPIO and ADC)
- Routes interrupt sources to either the ARM920Ts IRQ or FIQ (Fast IRQ) inputs
- Three dedicated off-chip interrupt lines operate as active high level sensitive interrupts
- Any of the 19 GPIO lines maybe configured to generate interrupts
- Software supported priority mask for all FIQs and IRQs
NOTE:
For peripheral driver development purpose, notice that the external IRQ lines 5,6 and 7, which are ISA/X86 architecture based, are mapped to EP9302 external interrupt lines 22, 33 and 40, respectively. For further information about interrupts, including the EP9302 interrupt controller and map, refer to the EP9302 User's Guide, chapter 5.
WARNING:Since the TS-7350s FPGA uses IRQ7, any PC/104 daughter board that uses IRQ7 must be open drain in order to allow IRQ sharing, otherwise there will be an IRQ conflict. For instance, the TS-SER4 is not compatible with the TS-7350 when configured to use IRQ7 because the TS-SER4 actively drives the IRQ high/low.
TS-7350 uses two types of memory. The SDRAM is the fast access volatile memory used to run applications by the processor and flash memory may also be added using USB memory drivers.
On-Board SDRAM
The TS-7350 uses SDRAM technology to provide 32, 64, or 128 MB of high-speed volatile memory. The memory is soldered directly to the board, making the TS-7350 more reliable in high-vibration environments.
The TS-7350's RAM is not contiguous in the physical memory map of the EP9302. But the MMU is programmed to remap the blocks of RAM to appear as a contiguous block of memory at the very beginning of the virtual memory map. In the case of a 256 Megabit SDRAM chip (32 MB), it is located at 0 through 32 MB in the virtual memory map.
Refer to the MMU section of this manual to understand how the physical memory is mapped and the virtual memory is translated.
NOTE:
It is possible to use larger sizes of the SDRAM chip than the standard 32 MB one. The TS-7350 is designed to accommodate both 32 MB and 64 MB chips, providing up to 128 MB of RAM memory. Contact Technologic Systems for larger SDRAM sizes.
Battery Backed SRAM
There is a peripheral board available for the TS-7350 named TS-NVRAM that adds 32K bytes or 128 Kbytes or 512K bytes of battery-backed SRAM. Battery backed SRAM provides non-volatile memory with very fast write times and unlimited write cycles, unlike Flash memory. This can be very important if the data is constantly being updated several times per minute, since Flash devices can wear-out after a few million write cycles. It also eliminates the latency that Flash memory has during write cycles, since Flash technology write cycles are about 10-100 times slower than read cycles. The TS-NVRAM peripheral board is located at the PC/104 memory space base address of 0x11AA_0000. This resource is a byte-wide memory device using a lithium battery that is guaranteed to last a minimum of 10 years with or without power applied.
USB Flash Drive or SD Card
Additional non-volatile storage may be added with a USB flash drive or a SD card. These devices supply 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 website. Alternatively, the developer's kit includes a USB flash thumb-drive or SD card pre-loaded with Debian. Flash memory provided by these devices behaves much as a hard drive does with sizes ranging from 32MB to 16GB. These products are inherently more rugged than a hard drive since they are completely solid-state with no moving parts. However, they have the added advantage of being removable media. Use of a SD card with TS-7350 SBC requires a USB SD card adapter, which will also be included in the TS-LCD-READY Development Kit if requested. The USB flash drive has the advantage over a SD card in that the USB drive can be hot swapped.
SD Memory Card
Technologic Systems has a full license for using the additional SD features which are reserved for members of the SD Card Association. This has allowed us to design both the hardware logic core and software specifically tuned to the capabilities of the TS-7350 CPU using the official SD specification documents. Since both a Linux driver module and an ARM9 object file containing OS-independent access routines are provided to customers purchasing the board hardware, customers do not have to seek SD licensing themselves.
SD Memory Card technology provides large capacity and fast access combined with a compact and slim profile, making it very appealing for a wide range of next generation products and applications. In addition, SD Cards feature content protection, planned capacity growth, high-speed data transfer, and a write protect switch. These devices supply additional non-volatile storage either for data or for a complete operation system distribution, such as Debian, to be used with the TS-7350 SBC.
The TS-7350 optionally supports a Non-volatile Battery-backed real-time clock (RTC) which is soldered onto the board. This option uses an ST Micro M48T86PC1 module for the real-time clock function. This module contains the lithium battery, 32.768 kHz crystal, and a RTC chip with 114 bytes of battery-backed CMOS RAM. It will maintain clock operation for a minimum of 10 years in the absence of power.
The 114 bytes of non-volatile RAM, physically located in the RTC chip, are available to the user. Contact Technologic Systems for driver support.
The RTC can be accessed and setup through the hwclock command:
/ # hwclock --help
hwclock - query and set the hardware clock (RTC)
Usage: hwclock [function] [options...]
Functions:
--help show this help
--show read hardware clock and print result
--set set the rtc to the time given with --date
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time
--adjust adjust the rtc to account for systematic drift since
the clock was last set or adjusted
--getepoch print out the kernel's hardware clock epoch value
--setepoch set the kernel's hardware clock epoch value to the
value given with --epoch
--version print out the version of hwclock to stdout
Options:
--utc the hardware clock is kept in coordinated universal time
--localtime the hardware clock is kept in local time
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore rtc's year because the bios is broken
--date specifies the time to which to set the hardware clock
--epoch=year specifies the year which is the beginning of the
hardware clock's epoch value
--noadjfile do not access /etc/adjtime. Requires the use of
either --utc or --localtime
The TS-7350 incorporates a Watchdog Timer (WDT) unit. The WDT can be used to prevent a system "hanging" due to a software failure. The WDT causes a full system reset when the WDT times out, allowing a guaranteed recovery time from a software error. To prevent a WDT timeout, the application must periodically "feed" the WDT by writing a specific value to a specific memory location. The watchdog functionality was implemented in the TS-7350 on 9/12/2009. To find out if your TS-7350 has the watchdog implemented, use "peekpoke 16 0x600FF080". There will be four hex digits total. The first three (0x6C8) identify the system as a TS-7350, the last identifies the revision number for the FPGA programming. A value of 0x8 or above indicates that the watchdog has been implemented in your FPGA version.
The "ts7000.subr" shell function script provides an insight as to how to utilize the watchdog timer:
wdt_on_338ms() {
peekpoke 16 0x600ff0d6 0x0 > /dev/null 2>&1
}
wdt_on_2706ms() {
peekpoke 16 0x600ff0d6 0x1 > /dev/null 2>&1
}
wdt_on_10824ms() {
peekpoke 16 0x600ff0d6 0x2 > /dev/null 2>&1
}
wdt_on() {
wdt_on_10824ms
}
wdt_off() {
peekpoke 16 0x600ff0d6 0x3 > /dev/null 2>&1
}
The WDT register (memory location 0x600ff0d6) must be re-initialized within the timeout period desired. This may be as short as 338 mS or may be as long as 10.824 seconds. After the WDT has been enabled, the WDT counter begins. The application software can reset this counter at any time by "feeding" the WDT. If the WDT counter reaches the timeout period, then a full system reset occurs.
Table: Watchdog Timeout Register
WARNING:Use only the Watchdog Timer implemented by Technologic Systems in the CPLD. The Watchdog Timer included in the EP9302 has serious problems.
The TS-7350 has two built-in true random number generators (RNG). The numbers are
generated from internal random entropy. The 16-bit value at address 0x600f_f0d0 and 0x600f_f0d2
contains the most recent random value generated. Only thirty-two bits of true
random data are created every second, so if these registers are read more quickly
the values read are not guaranteed to be random: in fact, you will either read
the same value as previously or else a pseudo-random intermediate value from the
last value generated.
The 5,000 LUT Lattice FPGA is an integral part of the TS-7350 design. When the TS-7350 is powered on, the FPGA comes on first and it then boots the CPU, using boot code from the SD card. After an operating system has booted, the FPGA provides the CPU access to the SD cards, and the PC/104 connector. The default FPGA load allows these pins to be used either as a standard PC/104 bus or for GPIO. Due to the flexibility of FPGAs, many other functionalities are possible such as quadrature encoders, PWM outputs, extra serial ports, or other unique communications protocols. Please contact Technologic Systems if you require custom FPGA logic.
There are three LEDs on the TS-7350: one red, one green, and one yellow. The green LED comes on at power-up and stays on by default (boards born before 9/12/2009 all LEDs flash on and then stay off by default). The green and red LEDs are controlled through the CPU GPIO port E. They can be controlled using bits 0 (GRN) and 1 (RED) of the port E register at address 0x8084_0020. The yellow LED is controlled by bit 6 of the register at 0x600ff084. For example, using "bit_set 32 0x80840020 0" will turn on the green LED, whereas bit_clr 32 0x80840020 0 will turn it off and using "bit_set 32 0x80840020 1" will turn on the red LED, whereas bit_clr 32 0x80840020 1 will turn it off.
The general header is a 40 pin (2x7, 0.1" spacing) header providing I2C, SPI, GPIO, latched outputs, buffered inputs, A/D inputs, an external reset line, and a console UART.
The general header is made up of two adjacent headers, labeled JTAG and DIO:
The pins on the 40 pin header serve a variety of functions. Refer to the table below to see which pins are available for each functionality.
| Pin Number |
Name |
Function |
| JTAG 1 | JTAG_DOUT | Reserved |
| JTAG 2 | JTAG_TMS | Reserved |
| JTAG 3 | GND | Tied to ground |
| JTAG 4 | JTAG_DIN | Reserved |
| JTAG 5 | HGPIO_3 | DIO |
| JTAG 6 | JTAG_CLK | Reserved |
| JTAG 7 | UART0_TXD | UART0 |
| JTAG 8 | UART0_RXD | UART0 |
| JTAG 9 | SPI_MISO | SPI bus |
| JTAG 10 | 3.3V | Tied to 3.3V |
| JTAG 11 | HGPIO_5 | DIO |
| JTAG 12 | SPI_MOSI | SPI bus |
| JTAG 13 | FLASH_CS# | Reserved |
| JTAG 14 | SPI_CLK | SPI bus |
| JTAG 15 | 5V | Tied to 5V |
| JTAG 16 | EXT_RESET# | External reset |
| DIO 1 | SPI_FRAME | SPI bus |
| DIO 2 | GND | Tied to ground |
| DIO 3 | RSVD | Reserved |
| DIO 4 | OUT_5 | Latched output |
| DIO 5 | IN_00 | Buffered input |
| DIO 6 | OUT_4 | Latched output |
| DIO 7 | IN_01 | Buffered input |
| DIO 8 | OUT_3 | Latched output |
| DIO 9 | IN_02 | Buffered input |
| DIO 10 | OUT_2 | Latched output |
| DIO 11 | IN_03 | Buffered input |
| DIO 12 | OUT_1 | Latched output |
| DIO 13 | IN_04 | Buffered input |
| DIO 14 | OUT_0 | Latched output |
| DIO 15 | IN_05 | Buffered input |
| DIO 16 | ADC4/BGPIO_7 | ADC/DIO |
| DIO 17 | IN_06 | Buffered input |
| DIO 18 | BGPIO_6 | DIO |
| DIO 19 | BGPIO_5 | DIO |
| DIO 20 | ADC2 | ADC/Buffered input |
| DIO 21 | I2C_SDA | I2C |
| DIO 22 | ADC1 | ADC/Buffered input |
| DIO 23 | I2C_SCL | I2C |
| DIO 24 | ADC0 | ADC/Buffered input |
Please note:Pins labeled "reserved" are used at the factory for production purposes and should not be used for applications.
Pins labeled ADC are available for analog to digital conversion using the Cirrus 5 channel A/D converter. Channels 0, 1, 2, and 4 are available for applications. Channel 3 is used internally.
Each of these pins, if not being used for A/D conversion, can instead be used as a buffered input, or in the case of pin DIO 16, a GPIO pin. For instructions on that please refer to the relevant section below.
Pins named "DIO" in the funtion column are connected directly to EP9302 GPIO pins. To use these pins, you must first set the data direction registers, and then read or write values from the data registers. When accessing these registers, it is important to do a read-modify-write, as other bits may be used internally. Pins named "BGPIO" are accessed through port B. The port B data direction register is located at address 0x80840014 and the port B data register is at 0x80840004. Pins named "HGPIO" are accessed through port H. The port H data direction register is located at address 0x80840044 and the port H data register is at 0x80840040.
There are a total of 10 buffered digital input lines. Pins IN_0 through IN_6 are dedicated digital inputs, while pins IN_9 through IN_11 are in parallel with analog inputs and thus can only be used for digital input if analog inputs are not needed. Pins IN_0 through IN_3 have resistor pull-ups. The others will return random data if not driven high or low.
The 32 bit register at address 0x600f_f084 provides access to digital inputs. Pins IN_0 through IN_6 are accessed by bits 7 through 13. Pin IN_9 is accessed by bit 15. Pins IN_10 and IN_11 are accessed by bits 11 and 12 of the register at address 0x600f_f086.
Pins OUT_0 through OUT_5 are digital output lines. The 32 bit register at address 0x600f_f084 provides access to digital outputs through bits 0 through 5.
UART0_TXD and UART0_RXD bring out the TTL level signals from the CPU. By default, this UART provides boot messages and the Linux console.
The SPI_CLK, SPI_MOSI, SPI_MISO, and SPI_FRAME pins bring out the SPI bus from the EP9302 CPU. Please refer to the EP9302 user's guide for more information.
The I2C_SCL and I2C_SDA pins bring out the I2C bus from the EP9302 CPU. Please refer to the EP9302 user's guide for more information.
Driving the external reset pin low will reset the CPU. While the JFS file system on the SD card is extremely resilient and is normally not damaged by hard resets, rebooting the board using the reboot command is still recommended if the file system is mounted read/write.
The TS-7350 has an optional on-board temperature sensor (part #:OP-TMPSENSE).
The temperature sensor used is a TMP124; a copy of the datasheet can be found here, and
sample code can be found here.
The temperature sensor is accessed via SPI pins on the DIO header documented
in the previous section. The DATA pin on the TMP124 is connected to the
SPI_MISO# signal, while the CLK pin is connected to the SPI_CLK pin. In addition
there is a chip select signal which must be asserted in order to use the
temperature sensor chip. This signal is accessed through bit 2 of the register
at address 0x80840030. (CPU GPIO port F) Note that the polarity of this signal is active high (set
this bit to select the temp sensor).
The PC/104 is a compact implementation of the PC/AT ISA bus ideal for embedded
applications. Designers benefit from an established industry standard bus that already has
well-developed documentation and many compatible peripherals available in the market
place. The presence of a compact form-factor PC compatible standard has encouraged
the development of a broad array of off-the-shelf products, allowing a very quick time to
market for new products.
The electrical specification for the PC/104 expansion bus is identical to the PC ISA bus.
The mechanical specification allows for the very compact implementation of the ISA bus
tailor made for embedded systems. The full PC/104 specification is available from the
IEEE Standards Office, No. IEEE P996.1.
This bus allows multiple peripheral boards to be added in a self-stacking bus. Since the
electrical specs are identical (except for drive levels) to a standard PC ISA bus, standard
peripherals such as COM ports, Digital I/O, Ethernet ports, and LCD drivers may be easily
added.
To use the PC/104 Bus, it must be turned on while in the fastboot/initrd environment with
the command:
pc104on
The PC/104 Bus can also be turned on while in the Debian environment with the commands:
. /initrd/ts7000.subr
pc104on
The PC-104 connector consists of 64 pins in two rows labelled A and B.
The numbering of the pins in each row is shown below:
|