ページ1に含まれる内容の要旨
®
KwikNet
MPC5200 FEC
Device Driver
User's Guide
Version 3
First Printing: November 15, 2004
Last Printing: September 15, 2005
Manual Order Number: PN383-9E
Copyright © 2004 - 2005
KADAK Products Ltd.
206 - 1847 West Broadway Avenue
Vancouver, BC, Canada, V6J 1Y5
Phone: (604) 734-2796
Fax: (604) 734-8114
ページ2に含まれる内容の要旨
ページ3に含まれる内容の要旨
TECHNICAL SUPPORT KADAK Products Ltd. is committed to technical support for its software products. Our programs are designed to be easily incorporated in your systems and every effort has been made to eliminate errors. Engineering Change Notices (ECNs) are provided periodically to repair faults or to improve performance. You will automatically receive these updates during the product's initial support period. For technical support beyond the initial period, you must purchase a Technical Suppo
ページ4に含まれる内容の要旨
Copyright © 2004-2005 by KADAK Products Ltd. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of KADAK Products Ltd., Vancouver, BC, CANADA. DISCLAIMER KADAK Products Ltd. makes no representations or warranties with respect to the
ページ5に含まれる内容の要旨
KwikNet MPC5200 FEC Device Driver User's Guide Table of Contents Page 1. Introduction 1 2. Installation 2 3. Configuring the Network 3 4. Configuring the Device Driver 4 5. Making the KwikNet MPC5200 BestComm Library 5 6. Special Considerations 7 6.1 BestComm Initialization ...................................................................... 7 BestComm FEC Initialization.............................................................. 8 MPC5200 Register Support ...........................
ページ6に含まれる内容の要旨
This page left blank intentionally. iv KwikNet MPC5200 FEC Device Driver KADAK
ページ7に含まれる内容の要旨
KwikNet MPC5200 FEC Device Driver 1. Introduction The Motorola PowerPC MPC5200 includes a single channel Fast Ethernet Controller (FEC) that supports 10Mbps and 100Mbps data transfer rates. The FEC can operate only in conjunction with the MPC5200 BestComm DMA Engine that provides DMA services to a number of MPC5200 subsystems. The BestComm engine is driven by its private tasks which execute from microcode located in the MPC5200 static RAM memory. These tasks are not to be confused with tasks
ページ8に含まれる内容の要旨
2. Installation The KwikNet MPC5200 FEC Ethernet Device Driver is provided on the KwikNet CD-ROM. The installation process installs the driver files in directory KNT303\KN5200E within an installation directory of your choice. Note that this directory is separate from the KwikNet PPC32 installation directory KNT383 or the KwikNet Porting Kit installation directory KNT713. The driver files are installed in the following subdirectories within installation directory KNT303\KN5200E: ERR Constructi
ページ9に含まれる内容の要旨
3. Configuring the Network You must define each network that your application supports. You can dynamically add a network interface at runtime. Alternatively, you can define your network interface in your KwikNet configuration. Networks defined in this manner will be prebuilt for you when KwikNet is started. To add a prebuilt MPC5200 Ethernet network interface definition to your KwikNet Library, use the KwikNet Configuration Manager to edit your Network Parameter File. The network parameters
ページ10に含まれる内容の要旨
4. Configuring the Device Driver You must define the KwikNet device driver attached to each network interface that your application supports. If you call KwikNet procedure kn_ifadd() to dynamically add a network interface at runtime, you must provide the device driver definition as a parameter in the call. If you specify a prebuilt network, you must define its device driver by using the KwikNet Configuration Manager to edit your KwikNet Network Parameter File. The driver parameters are edited
ページ11に含まれる内容の要旨
5. Making the KwikNet MPC5200 BestComm Library The make process depends upon the structure of the KwikNet MPC5200 FEC Ethernet Device Driver installation directory KN5200E. When the driver is installed, the following subdirectories are created within directory KN5200E. ERR Construction error summary M5200E Driver source and header files M5200BC BestComm API and microcode source and header files MAKE Construction make directory TOOLXXX Toolset specific files TOOLXXX\LIB Toolset specific library
ページ12に含まれる内容の要旨
Creating the Driver Library The KwikNet MPC5200 BestComm Library must be constructed from within the driver installation directory KN5200E\MAKE. To create the library, proceed as follows. From the Windows Start menu, choose the MS-DOS Command Prompt from the Programs folder. Make the driver installation KN5200E\MAKE directory the current directory. To use Microsoft's NMAKE utility, issue the following command. NMAKE -fKN5200E.MAK "TOOLSET=XXX" "TRKPATH=treckpath" The make symbol TOOLSET is def
ページ13に含まれる内容の要旨
6. Special Considerations 6.1 BestComm Initialization The KwikNet MPC5200 FEC Ethernet Device Driver depends upon the BestComm API and microcode supplied by Freescale Semiconductor, Inc. The BestComm microcode must be loaded into memory and initialized once prior to initialization of any of the subsystems that it supports. Each subsystem, such as the FEC, must then start and assume control of the BestComm tasks upon which the subsystem depends. Initialization of the BestComm firmware presents
ページ14に含まれる内容の要旨
BestComm FEC Initialization The KwikNet MPC5200 FEC device driver must initialize the BestComm FEC receive and transmit tasks to match the driver's configured requirements. Unfortunately, the BestComm FEC initialization must only be performed once. However, the MPC5200 FEC driver can be opened and closed many times as KwikNet operates. Each time the driver is opened, it must initialize the FEC hardware but it must only initialize the BestComm FEC subsystem once. To meet this requirement, an F
ページ15に含まれる内容の要旨
6.2 BestComm Source Code Modifications KADAK has successfully used the BestComm API and firmware source code without modification using the Metrowerks software development tools. All modules have been successfully compiled without warnings or errors. However, when the BestComm source code is compiled using the Diab (Wind River) or MetaWare tools, numerous warnings and some errors are encountered. KADAK has made no attempt to review or repair the source code which generated warnings. However,
ページ16に含まれる内容の要旨
6.3 MPC5200 Interrupt Exceptions The PowerPC MPC5200 interrupt management subsystem is incredibly complex. All device interrupt sources are funneled through three PowerPC exceptions in the processor Exception Vector Table. Normal interrupt sources are vectored to the external interrupt exception at offset 0x0500. Critical interrupts, including all interrupt requests generated by the BestComm DMA Engine, are vectored to the critical interrupt exception at offset 0x0A00. Other internal interr
ページ17に含まれる内容の要旨
The base vector for the block of interrupt vectors within the AMX Vector Table is specified by you in your AMX Target Configuration Module. Use the AMX Configuration Manager to edit your Target Parameter File and enter your definitions on the Exceptions property page. Note that a Warning will always be displayed indicating that the three MPC5200 exceptions share a common, overlapping region of the AMX Vector Table. The warning can be safely ignored. The MPC5200 FEC device driver provides supp
ページ18に含まれる内容の要旨
6.4 Configuring the Physical Device The Ethernet transceiver device (PHY) is configured by function kn_5200_pcon_fec() in the driver's pin assignment and board setup module M5200EBS.C. The PHY is configured each time the device driver is called by the KwikNet Ethernet network driver to open the network interface for use by the application. The PHY wiring mode is determined by an attribute setting in the device driver parameter list (see Appendix A). If attribute bit W is 0, the 18-wire (MII)
ページ19に含まれる内容の要旨
Mode 2: Periodic Sampling By default, the MPC5200 FEC device driver is configured to use a third, preferred method of operation. The driver uses a KwikNet timer to periodically sample the PHY, watching for the auto-negotiation to complete. The sampling period, the wait interval and an additional post-negotiation delay are all configurable parameters. By default, the driver samples at the KwikNet clock frequency for up to 3 seconds, with no additional delay. The device driver reports the succe
ページ20に含まれる内容の要旨
Appendix A. MPC5200 FEC Device Driver Data Sheet The KwikNet Device Driver Technical Reference Manual describes the design and implementation requirements for all KwikNet device drivers. Appendix C of that manual illustrates the layout of a data sheet used to describe each unique KwikNet device driver. The KwikNet MPC5200 FEC Ethernet Device Driver conforms to the naming conventions and operating specifications presented in the KwikNet Device Driver Technical Reference Manual. The following d