background image

KwikNet

 MPC5200 FEC Device Driver

KADAK

13

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 success or failure of the auto-negotiation process to the
Ethernet network driver.  If a link has been established, the network driver completes the
opening process and declares the network interface operational.  If necessary, IP address
negotiation will then be initiated using either DHCP or AutoIP according to your network
interface definition.

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's PHY initialization strategy, you must edit the
device driver header file 

M5200E.H

.  Define symbol 

DD_WAITANC

 to be 

DD_NOWAIT

 for no

delay, 

DD_POLLING

 for continuous polling and 

DD_SAMPLING

 (the default) for periodic

sampling.  The timeout interval(s) and sampling interval can be defined as described in
the file.

Event Callback Notification

When the periodic sampling method is used (

DD_WAITANC

 is 

DD_SAMPLING

), the device

driver generates a network event to signal the success (

KN_EV_DVCUP

) or failure

(

KN_EV_DVCFAIL

) of the PHY auto negotiation.

If you implement the 

KwikNet

 event notification function 

kn_netevent()

 as described in

Chapter 4.5 of the 

KwikNet

 TCP/IP Stack User's Guide, your function will be called

whenever either of these network events is generated.  Note that your function will be
called again when the network is subsequently declared open (up) or closed (down).

Содержание KwikNet MPC5200

Страница 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...

Страница 2: ......

Страница 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...

Страница 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...

Страница 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...

Страница 6: ...iv KADAK KwikNet MPC5200 FEC Device Driver This page left blank intentionally...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 22: ......

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Отзывы: