background image

MPC5200 FEC Device Driver

KADAK

M5200E-5

MPC5200 FEC Ethernet

Device Driver Data Sheet 

(continued)

Porting the MPC5200 FEC Ethernet Device Driver

The 

KwikNet

 MPC5200 FEC Ethernet Device Driver is ready for use on the Motorola

Lite5200 Evaluation Board.  The default board driver module 

KN_BOARD.C

 provided with

KwikNet

 is also ready for use with this board.

To port this device driver to your MPC5200 hardware, proceed as follows.  Review
header file 

M5200E.H

 and be sure that the symbols defined at the beginning of the file

match your intended MPC5200 use.  Alterations will be required in only the rarest of
configurations.

If you are using AMX PPC

32

, you can use Interrupt Identification Procedure 

ch500vd()

in the AMX board support module, 

LITE5200.S

, to derive the AMX vector number for

the interrupting devices.

Summary of Contents for KwikNet MPC5200

Page 1: ...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 V6...

Page 2: ......

Page 3: ...n Contact KADAK for details Please keep us informed of the primary user in your company to whom update notices and other pertinent information should be directed Should you require direct technical as...

Page 4: ...ties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability and fitness for any particular purpose Further KADAK Products Ltd reserves the right to re...

Page 5: ...BestComm Library 5 6 Special Considerations 7 6 1 BestComm Initialization 7 BestComm FEC Initialization 8 MPC5200 Register Support 8 6 2 BestComm Source Code Modifications 9 6 3 MPC5200 Interrupt Exc...

Page 6: ...iv KADAK KwikNet MPC5200 FEC Device Driver This page left blank intentionally...

Page 7: ...nd the resulting object modules must be merged into a library module which will be referred to as the KwikNet MPC5200 BestComm Library The device driver can be used with KwikNet PPC32 PN383 2 and AMX...

Page 8: ...ssignment and MII setup M5200E KN5200BC C KwikNet BestComm initialization source file M5200E KN5200BC H KwikNet BestComm header file MAKE KN5200E MAK KwikNet MPC5200 BestComm Library make specificatio...

Page 9: ...t 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...

Page 10: ...ameter 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...

Page 11: ...o tailor the KwikNet Library construction process for the Microsoft make utility This file is a copy of the most recent tailoring file for toolset XXX provided with KwikNet PPC32 For toolset UU the fi...

Page 12: ...g Microsoft s NMAKE utility and Metrowerks tools issue the following command NMAKE fKN5200E MAK TOOLSET ME TRKPATH C TRECK During the library construction process all KwikNet device driver source file...

Page 13: ...the BestComm firmware to meet the needs of all parts of your application which depend upon BestComm services A BestComm initialization procedure kn_BestCommSetup is provided with this device driver i...

Page 14: ...alues the call is rejected with an error status because the BestComm FEC subsystem cannot be reconfigured to meet the revised configuration requested A custom timing service is implemented in source f...

Page 15: ...owing code fragment near the beginning of header file BESTCOMM_API H KADAK Products Ltd Patch to avoid compiler errors ifdef CC_INLINE Define alternate keyword for inline function declaration define i...

Page 16: ...ng exception handler code can be a daunting task In fact the complexity provides a good reason to use an RTOS such as KADAK s AMX PPC32 kernel which services these exceptions for you Operation with AM...

Page 17: ...port for two interrupt sources the FEC channel and the BestComm FEC subsystem Each of these interrupt sources is assigned to a specific vector in the AMX Vector Table If the First vector number for th...

Page 18: ...the KwikNet TCP IP stack while it awaits the PHY negotiation results The driver offers three modes of operation to cope with this issue Mode 0 No Delay In the simplest case the driver ignores the nego...

Page 19: ...ion If the PHY auto negotiation fails the Ethernet network driver will declare that the network interface cannot be opened for use Choosing the Mode of Operation To alter the MPC5200 FEC device driver...

Page 20: ...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 th...

Page 21: ...KwikNet Device Driver MPC5200 FEC Ethernet Copyright 2004 2005 KADAK Products Ltd 206 1847 West Broadway Avenue Vancouver BC Canada V6J 1Y5 Phone 604 734 2796 Fax 604 734 8114...

Page 22: ......

Page 23: ...n the Motorola Lite5200 Evaluation Board Configure This device driver includes a number of low level configurable parameters which can only be adjusted by editing the definitions in the driver source...

Page 24: ...must be 0 S This bit defines the FEC operation speed If this bit is 0 the FEC will operate at 10Mbps If this bit is 1 the FEC will operate at 100Mbps D This bit defines the duplex mode of operation I...

Page 25: ...dles the separation of interrupts and their vectoring through a single linear array referred to as the AMX Vector Table Consequently when using KwikNet with AMX PPC32 the AMX vector numbers are used a...

Page 26: ...g inefficiencies All receive and transmit buffers must be aligned on an n byte boundary where n is defined by symbols DD_RCVALIGN and DD_TXALIGN in header file M5200E H to be 4 To avoid data caching i...

Page 27: ...with KwikNet is also ready for use with this board To port this device driver to your MPC5200 hardware proceed as follows Review header file M5200E H and be sure that the symbols defined at the begin...

Page 28: ...pt source 2 transmit buffers and 8 receive buffers are required Enter the following five device driver parameters Parameter 1 0x00040000 Parameter 2 0x9F000A97 Parameter 3 0 Parameter 4 0x00470029 Par...

Reviews: