Special considerations, 1 bestcomm initialization, Special considerations 6.1 bestcomm initialization – Motorola MPC5200 User Manual
Page 13

KwikNet MPC5200 FEC Device Driver
KADAK
7
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 the system designer with some difficult
startup issues. A number of different parts of an application will depend upon the
BestComm firmware. Each part must initialize the BestComm firmware properly for use
by that part. The
KwikNet
MPC5200 FEC Ethernet Device Driver is one such part. And
yet the BestComm microcode must be loaded and initialized only once.
You, as the system designer, must ultimately bear responsibility for loading and
initializing 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 in source file
KN5200BC.C
. This procedure must be called once, and only once, by
your application as it starts up. It must be called before
KwikNet
procedure
kn_enter()
is
called to launch
KwikNet
.
In a multitasking system, procedure
kn_BestCommSetup()
must be called from an
application task. In a single threaded system, it must be called from your
KwikNet
App-
Task executing in the user domain.
Procedure
kn_BestCommSetup()
handles the relocatable loading of the BestComm
firmware image into system memory. It then initializes the BestComm API, microcode
and private Task Table for subsequent use by the
KwikNet
MPC5200 FEC Ethernet
Device Driver.
You are free to edit source file
KN5200BC.C
to adapt the BestComm firmware loading and
initialization sequence to your particular needs. Alternatively, you can merge the code
from module
KN5200BC.C
into your own BestComm initialization module.
Note
The BestComm firmware must be loaded and initialized
once, and only once, by your application software.