dimmPCITM 68VZ328Hardware / SoftwareManualwww.amctechcorp.comAMC Technologies Corporation, July 2003Revision 0.5.3 for SDK 2.05 Linux Kernel 2.0
10www.amctechcorp.comThis page left intentionally blank
100www.amctechcorp.comkernel.bin is a binary file containing the image of the compiled dimmPCI kernel, and it is the default kernel file.kernel.bin is
www.amctechcorp.com 101Erasing the flash with the -em option allows for the journaling flash file system (jffs) to be preserved when youwish to load a
102www.amctechcorp.comTo download using the default download program, image.bin:-dThis will download an image from the flash.To specify the download p
www.amctechcorp.com 103AppendixThe following is the format of the init.b file:aaaaaaaaccdd’\n\r’ whereaaaaaaaa addresscc count (cannot be equal to 0
104www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 105AppendixLicensing, Copyrights & LiabilitydimmPCITM Software Development Kit DistributionThe different parts of the distribu
106www.amctechcorp.comFor example, if you distribute copies of such a program, whether gratis or for a fee, you must givethe recipients all the rights
www.amctechcorp.com 107You may charge a fee for the physical act of transferring a copy, and you may at your optionoffer warranty protection in exchan
108www.amctechcorp.coma) Accompany it with the complete corresponding machine-readable source code, which must bedistributed under the terms of Sectio
www.amctechcorp.com 1096. Each time you redistribute the Program (or any work based on the Program), the recipientautomatically receives a license fro
www.amctechcorp.com 11dimmPCITMuC68VZ328 Embedded MicrocontrollerFeaturesCPU Module• Powerful 33 MHz DragonBall microprocessor• Up to 32 Mbytes SDRAM•
110www.amctechcorp.comfollowing the terms and conditions either of that version or of any later version published by theFree Software Foundation. If
www.amctechcorp.com 111each source file to most effectively convey the exclusion of warranty; and each file should haveat least the “copyright” line a
112www.amctechcorp.comgrams. If your program is a subroutine library, you may consider it more useful to permit linkingproprietary applications with
www.amctechcorp.com 113
114www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 115AppendixReferences/ Suggested Reading1998 O’Reilly. Linux Device Drivers. Alessandro Rubini.2001 O’Reilly. Understanding the L
12www.amctechcorp.comGeneral DescriptionAMC Technologies Corporation (AMC) has developed the proposed dimmPCI™ standardsspecification which defines el
www.amctechcorp.com 13The Dragonball dimmPCI™ CPU module supports Ethernet 10BaseT, two serial ports, and agraphical “PDA style” LCD interface. The m
14www.amctechcorp.comArchitectureFigure 1. CPU ArchitectureFigure 2. Backplane ArchitectureDIMMDIMMPCIRJ-45ETHERNETBATTERYDIMMUSBPS-2keyboardRS-232LCD
www.amctechcorp.com 15The CPU Architecture consists of 4 main functional regions. The Ethernet Controller, the PCIInterface, the MCU Core and System
16www.amctechcorp.comThe RTL8019 ethernet chip supports either 8/16-bit interfaces, but because most NE2000 compat-ible drivers have been written for
www.amctechcorp.com 17A portion of the Flash has been allocated for use with the Journaling Flash File System (JFFS).The JFFS is mounted under the ‘/u
18www.amctechcorp.comto its working position in the memory map and to initialize SDRAM to address 0x00000000.SDRAMThe SDRAM used on the dimmPCITM is t
www.amctechcorp.com 19Ethernet ControllerThe dimmPCITM contains an on board RealTek RTL8019AS Ethernet controller and all thesupporting circuitry to i
2www.amctechcorp.comCopyright noticedimmPCITM System Development Kit CD-Rom, the text and graphics used in this manual, its cover, CD-Romartwork, dimm
20www.amctechcorp.comFigure 6. NETdimm Ethernet Schematic
www.amctechcorp.com 21Digital I/OThe Motorola MC68VZ328 processor provides numerous general purpose I/O lines to the dimmPCITM.The lines which have no
22www.amctechcorp.comFigure 7.1 Digital Output SchematicFigure 7.2 Digital Input Schematic
www.amctechcorp.com 23Figure 7.3 Analog Output Schematic
24www.amctechcorp.comFigure 7.5 Analog to Digital Converter SchematicFigure 7.4 Analog Input Schematic
www.amctechcorp.com 25Figure 7.6 Digital to Analog Converter SchematicPin # SideA SideB1 Analog In 0 Analog In 12 Analog In 2 Analog In 33VIOVIO4VIOVI
26www.amctechcorp.comRS-232The dimmPCITM provides a 10-pin header terminal RS232 port on the backplane capable ofrunning at up to 230400bps. RS232 li
www.amctechcorp.com 27•Multiple processes may be individually registered with the watchdog, each providing its owntimeout time. Each process must upd
28www.amctechcorp.comSPIA standard SPI bus is included on the dimmPCITM. This SPI bus is located on the DIMM socketoccupying pins 23-29 on both the A
www.amctechcorp.com 29dimmPCITM Signal DescriptionsFigure 10. dimmPCITM signals for System SlotPin # SideA SideB Pin # SideA SideB1 ETHRX- ETHTX- 43 C
www.amctechcorp.com 3NETdimm Developers Kit Quick Start GuideThis document is provided to help users bring up the NETdimm Developers Kit hardware ands
30www.amctechcorp.comPins 1-5 on the DIMM socket control the Ethernet port on the NETdimmTM. Pins 6-8 control the In-Circuit Emulator. Pins 9-13 con
www.amctechcorp.com 31has been extended to include ‘readb/readw/readl and writeb/writew/writel’ functions.The PCI BIOS also includes extensions to per
32www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 33uClinux InstallationInstalling the dimmPCITM SystemBuilder KitBefore beginningThis development kit requires an x86 compatible PC
34www.amctechcorp.comThis will remove the development tools and their links. Note: any additional files that you mayhave added to the SDK directories
www.amctechcorp.com 35Creating a ROM imageBefore using the development hardware a file system will need to be created for use on it. The ‘/opt/fs’ d
36www.amctechcorp.cominetd.conf - this file contains information on which internet services the board willprovideinittab - determines which program wi
www.amctechcorp.com 37Accessing the NetworkThe kernel supplied with the dimmPCITM CPU module supports TCP/IP networks (IPX is notsupported at this tim
38www.amctechcorp.comthe typical 0.70 version of ‘dhcpcd’) which is executed when an IP is first obtained, or should theIP address change (the common
www.amctechcorp.com 39cd ~/dimmpcimkdir sourcecd sourceCreate a simple ‘hello world’ C program called ‘hello.c’ such as this:#include <stdio.h>v
4www.amctechcorp.comcomputer.9. Ensure the EMU BRK jumper is not installed.10. Open the Linux “minicom” application. Select the serial port attached
40www.amctechcorp.com/(home directory)/dimmpci/source (rw)Of course you will need to add the home directory. This will allow anyone read and write ac
www.amctechcorp.com 41Updating Applications on your dimmPCI moduleThere are two methods for updating applications on the dimmPCI module: (1) create a
42www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 43Programming ModeProgramming the uC68VZ328There are two methods of reprogramming the flash of the dimmPCI. The first (and prefer
44www.amctechcorp.com5. All processes will be halted, and the programming will begin. The progress is shown by a‘.’ displayed every 4kbytes. An ‘E’
www.amctechcorp.com 45To use ‘oops’, the following steps must be followed:1. Insert the jumper on EMU BREAK and reset the dimmPCI board.2. Close any t
46www.amctechcorp.com3. The default kernel image file is ‘kernel.bin’ in the current working directory. The kernel.binfile is actually a symbolic link
www.amctechcorp.com 47
48www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 49AppendixSample CodeIncluded in the ‘/opt/samples/ directory are several files that show just some of the featuresavailable with
www.amctechcorp.com 5
50www.amctechcorp.comprintf (“Cannot open file\n”);exit (-1); } // print the string to file fprintf (file_handle, “Hello World!\n”); // cl
www.amctechcorp.com 51}This program will read the date from the kernel clock and print it out to the standard outputstream.// date.c//// This will rea
52www.amctechcorp.com // convert it to seconds since 1970 time_val.tv_sec = mktime (&tm_val); // set the time in the linux system clock
www.amctechcorp.com 53Finally, this source uses the inetd superserver to create a simple network server that will echoany characters received back to
54www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 55AppendixThe Journalling Flash File SystemThere are two different types of memory available on the dimmPCI CPU module, SDRAM andf
56www.amctechcorp.comA utility is included in the distribution that will erase all the data stored in the JFFS and reset itsconfiguration. This may b
www.amctechcorp.com 57
58www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 59CAppendixDevelopment Tool ChainsA development tool chain is the suite of programs (including the compiler, linker, assembler,di
6www.amctechcorp.comThis page left intentionally blank
60www.amctechcorp.comNormal Usage of the PIC-COFF Tool ChainThe PIC-COFF tool chain is normally very easy to use. The ‘Hello world’ program supplied
www.amctechcorp.com 61
62www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 63Application Note 1Using Digital I/O with dimmPCI ModulesD1July 4, 2003
64www.amctechcorp.comKernel and Filesystem ConfigurationThe uClinux 2.0 kernel must have the digital I/O option compiled for proper operation. These o
www.amctechcorp.com 65Kernel and Filesystem Configuration Flow ChartYESAt command Prompt Main Menu Inside Menu Optioncd /opt/uClinux/linuxmake m
66www.amctechcorp.comAvailable Digital I/O PinsThe number of pins available for digital I/O depends on the other options compiled into the kernel. Fo
www.amctechcorp.com 67Table 1: List of all available digital I/O pinsssalCemaNtiucriCtroPtiBtolSmetsySenalpkcaBniPredaeHenalpkcaBnwoD-lluP/pU-lluProts
68www.amctechcorp.comProgramming StructureThe structure that should be used to store pin configuration and information is dimm_io from dimmio.h,locate
www.amctechcorp.com 69Digital I/O FunctionsThe low level functions used to manipulate the digital I/O points are the system calls open, lseek, read,wr
www.amctechcorp.com 7IntroductionLaunching Linux at the embeddedThe modern world runs on computers and technology. Every corner you turn, every road
70www.amctechcorp.comDIMM_IO_IOCTL_MAP will return an offset given a port and bit number. The bit and portnumber must be assigned to port_number and
www.amctechcorp.com 71Sample ProgramsEach of the sample programs even_parity.c and xor.c demonstrate simple use of digital I/O. The source codefor th
72www.amctechcorp.comCheck if digital I/O character device exists: cd /opt/fs/romdisk/dev lsDoes io1 node exist?In the current /opt/fs/romdisk/dev
www.amctechcorp.com 73
74www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 75D2Application Note 2Configuring dimmPCI Modules for CommunicationApril 21, 2003
76www.amctechcorp.comOn the NETdimm in the system slot, the ethernet port, eth0, must be configured to have an IP address on thelocal network for your
www.amctechcorp.com 77From the main menu, inside of Networking Options this option must be set:IP forwarding/gatewayingAgain, from the main menu under
78www.amctechcorp.com Kernel Configuration Flow ChartAt Command PromptMain Menu OptionOptions to Selectcd /opt/uClinux/linuxmake menuconfigGeneral Set
www.amctechcorp.com 79Filesystem ConfigurationFor the dimmPCI units to be correctly configured for the subnet, the rc file must be modified. These di
8www.amctechcorp.comBesides all of the impressive features of Linux, it is also openly available in several differentarrangements and configurations.
80www.amctechcorp.comspecified since pci0 will be the network interface. The gateway value must correspond to the IP address of thesystem slot pci0,
www.amctechcorp.com 81Filesystem Configuration Flow ChartAt Command PromptModifications to ‘rc’ fileCopy filesystemcd /opt/cp –Rpdx newfs sysfscp –Rpd
82www.amctechcorp.comHost machine ConfigurationAfter configuring the two dimmPCI modules, they can now communicate with each other, as well as theouts
www.amctechcorp.com 83
84www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 85D3Application Note 4Using Multiple NETdimm ModulesAuthor: Bernice Lau Version 0.1AbstractOn a dimmPCI backplane, there are sever
86www.amctechcorp.comSimple Server & ClientThe sample programs server.c and client.c are available in the SDK samples directory,/opt/user_code/net
www.amctechcorp.com 87inetd.conf. Upon receiving a connection request, it will start up the server. Therefore the server has no needto set up socket
88www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 89D4Application Note 5Using Analog and Digital I/O with theIOdimmJune 30, 2003
www.amctechcorp.com 9What’s on the CD?On the CD you will find:• µClinux source files with patches to work on the dimmPCITM platform.• GCC cross compil
90www.amctechcorp.comAfter saving your configuration changes, use the following commands in the same directory to completecompilation of your kernel.m
www.amctechcorp.com 91 cd /opt/uClinux/linux make menuconfig At Command Prompt Main Menu Inside Menu Option Platform dependent support SPI suppor
92www.amctechcorp.comCategory Channel Backplane System Slot Backplane Header Pin Analog Input 0 A1 JP1/1 1 B1 JP2/1 2 A2 JP1/2 3 B2 JP2/2
www.amctechcorp.com 93I/O FunctionsThe low level functions used to manipulate the I/O channels are the system calls open, lseek, read,write, close, an
94www.amctechcorp.comAs shipped, each ADC channel has a divide by 4 attenuator stage and a multiply by 2 amplifier stage. Thus fora signal applied to
www.amctechcorp.com 95The sample FIR is a quick and dirty low pass filter with linear phase. The design parameters of the filter are a–3dB cutoff at
96www.amctechcorp.com in0 in1 in2 in3 in4 in5 in6 in7 out0 Even Parity even_parity_iodi
www.amctechcorp.com 97
98www.amctechcorp.comThis page left intentionally blank
www.amctechcorp.com 99D5Oops DocumentationUsing OopsJune 11, 2003 Version 0.1Aut
Komentáře k této Příručce