AN2757 Freescale Semiconductor / Motorola, AN2757 Datasheet - Page 13

no-image

AN2757

Manufacturer Part Number
AN2757
Description
MPC5200 Quick Start
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
5.4
The Interrupt Dispatcher is a “thin” piece of software layer which handles all exceptions generated by the MPC5200 system,
saves the EABI context and calls the user-supplied exception service routine.
For the case of external interrupts (External Interrupt, Critical Interrupt, System Management Interrupt) the Dispatcher is also
capable of decoding an interrupt source which needs to be serviced with highest priority and of invoking the user-supplied service
routine. Interrupt service routines can be assigned to each peripheral interrupt source either dynamically in run-time or statically
using the “appconfig.h” file and the Graphical Configuration Tool. The user may also want to save Floating-Point context and to
re-enable the Floating Point unit before passing an execution to the selected interrupt service routines.
In other words, the Interrupt Dispatcher effectively hides the differences between various peripheral interrupt sources of the
MPC5200 and it makes the interrupt handling easy and straightforward. The Interrupt Dispatcher is also natively supported by
the Graphical Configuration Tool. At each peripheral module configuration page, it is possible to specify an interrupt service
routine, assign an interrupt source priority and mask or unmask the interrupt source. For more information, see the
Interrupt Controller (SIM /
The Interrupt Dispatcher is implemented in the following files, all located in the “SystemConfig” subdirectory of the project folder
on a hard disk.
5.5
The MPC5200_Quick_Start is based on original Freescale (formerly Motorola) BSP (Board Support Package) code for the
MPC5200. To maintain compatibility with older BSP-based applications, the most of the BSP source files are included in each
project created using the MPC5200_Quick_Start Stationery. All BSP files are physically located in the “src\support\bsp” folder in
the MPC5200_Quick_Start installation. In the CodeWarrior project, all the BSP files used can be found in the “BSP” virtual project
folder.
Section 9, MPC5200 BSP
5.6
Each MPC5200_Quick_Start project includes a BestComm DMA microcode image as well as a set of the C source files
implementing a DMA tasks API. As described in the
MPC5200_Quick_Start Stationery differing only just by the DMA code.
In any case, the DMA files are located in the “dma_image” subdirectory of the project folder on the disk.
5.7
The last group of files included in all MPC5200_Quick_Start projects contains the source files implementing the low-level
initialization code for each MPC5200 peripheral module. All files are located in the “QS” virtual project folder in the CodeWarrior
project tree.
In addition to several system files, there is a pair of “.c” and “.h” files for each MPC5200 peripheral module. The following table
briefly describes the content of the “QS” source files.
Freescale Semiconductor
vectors.asm - this file contains Reset exception “handler” (a branch to __reset in the “board.c” file) and
prologue/epilogue code for all other PowerPC exceptions. Prologue and epilogue code take care of saving volatile EABI
registers and exception return address onto the software stack and of invoking a user-supplied exception handler
routine.
interrupt.c - this file implements an Interrupt Dispatcher functionality as described above in this section. When the
Interrupt Dispatcher is used, the three external exceptions in vectors.asm are hard-routed to the handlers supplied in
the “interrupt.c” file
The projects created using the DMA_ImageRtos1 or DMA_ImageRtos2 project templates include all required DMA
source files by default. The source code files can be found in the “DMA RTOS 1” or “DMA RTOS 2” virtual project folders
in the project tree.
The project created using the DMA_Custom project template includes only the source files containing the (empty) DMA
microcode image. In this case the external tools (e.g. BestComm Configuration Tool) are used to build a DMA image
and task C API files. It is then the user’s responsibility to add all generated source files to the CodeWarrior project.
Interrupt Dispatcher
BSP Source Code
DMA Files
Quick Start Source Code
ICTL).
gives a brief overview of the BSP code reuse in the MPC5200_Quick_Start applications.
AN2757 MPC5200 Quick Start and Graphical Configuration Tool
Section 4.2, Project
Targets, there are three project templates in the
Application Framework
Section 6.6.6,
13

Related parts for AN2757