AMX Target Guide Computer Accessories User Manual


 
AMX 68000 Target Guide
K
A
DAK
41
5.3 AMX Clock Drivers
AMX clock drivers are provided with AMX for the timer chips used on the boards with
which AMX has been tested. These drivers are ready for use as described in this chapter.
The clock drivers are delivered in chip support source files having names of the form
CHnnnnT.C where nnnn identifies the particular clock chip. The clock chip support
procedures are named chxxxxxxx.
5.3.1 MC683xx TPU Clock Driver
The AMX clock driver for the Motorola MC683xx TPU is ready for use on either the
Motorola M68332EVK Evaluation Kit or the GreenSpring Platform332 board. It is
configured to use timer channel 0 operating at 1 KHz (1 ms period). Source code for this
AMX clock driver is provided in file
CH68332T.C.
You must compile clock source module
CH68332T.C and link the resulting object module
with the rest of your AMX application.
To use the AMX MC683xx TPU clock driver, you must create a clock ISP root as
described in Chapter 4.3. Simply check the box next to the MC683xx TPU clock ISP on
the list provided via the Prebuilt Clock ISPs... button.
Your Target Configuration Module will include a clock ISP root named _ch68tpuclk.
The clock driver's initialization procedure will install the pointer to this clock ISP into the
AMX Vector Table. On the Motorola M68332EVK board or GreenSpring Platform332
board, the pointer is installed into the entry for interrupt vector number 96+n ($60+n)
where n is the TPU timer channel number (0 to 15).
Clock driver module CH68332T.C includes the clock initialization procedure
chclockinit and the clock shutdown procedure chclockexit. Insert procedure
chclockinit into the list of Restart Procedures provided in your System Configuration
Module at the point at which you wish the clock to be enabled during the launch. If you
intend to launch AMX for temporary execution, insert chclockexit into the list of Exit
Procedures at the point at which you wish the clock to be disabled during the shutdown.
Porting the MC683xx TPU Clock Driver
If you wish to use a different MC683xx TPU timer channel, change the timer frequency
or use a different AMX vector number, you must edit the definitions in source file
CH68332T.C and recompile the module. Edit instructions are included in the file.