
                   WELCOME to the MPC565 Start-up Pack

This is the README.TXT file for the M565r101.zip file. This file has everything
you need to start writing C programs for the MPC565 except the compiler. It
defines all of the registers and bit fields for the Spanish Oak.

TPU channels can be accessed as 32 bit values as shown below:
TPU access:
TPU_A.PARM.R[channel][param] == 1;

To access the TPU parameter RAM using 32 bit is done as shown:

TPU_A_PARAM.L[channel][param] == 0x12345678;

32 bit parameters are number 0-3.

A complete history of the changes to the MPC565 start-up pack is listed in the
file HISTORY.TXT.

The MPC565 registers can be used three different ways. There is an example
program to show each of the different ways (example1.c, example2.c and
example3.c). Each way to use the header file has advantages and disadvantages:

example1.c  (fixed strucutre)
-----------------------------
Advantage:    Easy to use, just include mpc565.h file.
Disadvantage: Generates larger slower code.
              Takes longer to compile.

exmaple2.c  (Diab sections)
---------------------------
Advantage:    Generates smaller faster code.
              Faster to compile.
Disadvantage: Harder to use.
              Only works with Diab compiler.

example3.c  (global pointers)
-----------------------------
Advantage:    Generates smaller faster code.
              Faster to compile.
Disadvantage: Harder to use.
              Uses 15 global pointers.

When using Diab sections or global pointers you must #define Main_Program in 
your main program only and #include "mpc565.h". You must define Main_Program 
before you include spoaj.h. When using Diab sections or global pointers you 
only need to include the modules that a file uses, see mpc565.c for an example.

When using Diab sections or global pointers you must also define DIAB_SECTIONS
or HEADER_POINTERS when compiling every file. You can do this by uncommenting
the defines in the m_common.h file or by adding the define to the makefile 
(look at the included makefile for an example).

This start-up pack has been setup using the Diab Data compiler, changes may
be needed for other compilers. This zip file contains the following files:

mpc565.h    -The header file for the Spanish Oak it defines all of the 
             registers and bit fields in the registers.

m_common.h  -Common type definitions and configuration.

m_uc3f.h    -Header file for the UC3F FLASH modules.

m_qadc.h    -Header file for the QADC modules.

m_qsmcm.h   -Header file for the QSMCM module.

m_mios1.h   -Header file for the MIOS1 module.

m_toucan.h  -Header file for the TOUCAN modules.

m_tpu3.h    -Header file for the TPU3 modules.

m_calram.h  -Header file for the CALRAM modules.

m_dptram.h  -Header file for the DPTRAM module.

m_uimb.h    -Header file for the UIMB module.

m_usiu.h    -Header file for the USIU module.

m_dlcmd2.h  -Header file for DLCMD2 module.

mpc565.c    -This file contains general setup code for using the Spanish Oak.

example1.c  -This a a simple program that shows how to use the standard 
             set-up files and headers using the fixed structure method.

example2.c  -This a a simple program that shows how to use the standard 
             set-up files and headers using the diab sections method.

example3.c  -This a a simple program that shows how to use the standard 
             set-up files and headers using the global pointers method.

makefile    -A makefile to build the three example programs. It requires a 
             make program.

ex_tbl.s   -This file contains the exception table definitions for MPC500
            devices. All exception routines are extern and imported to 
            this file.        

ex_tblc.s  -This file contains the reduced size exception table definitions
            for the MPC500 using the exception table relocation feature.
            All exception routines are extern and imported to this file.

ex_funcs.c -This file contains empty exception routines that are referenced 
            by the exception table file ex_tbl.s or ex_tblc.s. (This file
            mat need to be changed for a different compiler)

mpc565.dld  -This is a linker file for the mpc565. (This is specific
             to the Diab linker). 

crt0m500.s  -This is the file that configures the system and them calls the C
             main function. This is the standard file from Diab with a call to
             the mpc500 setup routine inserted. (This file will be different 
             for every compiler)

history.txt -A history of changes to the Spanish Oak start-up pack.

If you do not have a make program, try using GNU make. You can get GNU
make for windows at http://sourceware.cygnus.com/cygwin/ and for DOS at
http://www.delorie.com/djgpp/.

If you have any questions please feel free to contact me or send an email
to the MPC500 mailing list at mpc500@oakhill-csic.sps.mot.com.

-Jeff
 04 Oct 2000
__________________________________________________________________
\ Jeff Loeliger                      Motorola SPS                 \
 \ mailto:r12110@email.sps.mot.com   Systems Engineering Department\
  \ phone: +44-1355-35-5400          Powertrain Systems Division    \
   \ fax : +44-1355-35-6300          East Kilbride, Scotland         \
    \ Motorola Internal: http://ncsg-euroweb.sps.mot.com/~r12110      \
     \_________________________________________________________________\





