On-Chip Peripheral Initialization - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

Developing Software
Support
— FreeMASTER - contains FreeMASTER software support files freemaster.h and
freemaster_xxx.c.
Include- contains header files for the driver source files.
Now, you can start writing your code in the C source file main.c and to configure the on-chip
peripherals into the include file appconfig.h, either manually or by using the Graphical
Configuration Tool (GCT). See Chapter 7 for GCT usage.
4.2

On-chip peripheral initialization

The DSP56800E_Quick_Start provides a very effective mechanism on how to initialize statically
all on-chip peripherals. The static configuration of on-chip peripherals is provided by the
application specific configuration file appconfig.h, in cooperation with the ioctl driver commands
xx_INIT (xx is the peripheral prefix used in all ioctl commands). These commands are for
example QT_INIT for Quad Timer, PWM_INIT for Pulse Width Modulator, etc.
The configuration file appconfig.h is used to define the configuration items, which determine the
configuration of the on-chip peripheral. Each configuration item corresponds to one register of the
respective on-chip peripheral. The defined configuration items are written to peripheral registers
by the ioctl driver commands xx_INIT, which are called by the user somewhere in the
initialization code of the application.
The step by step procedure to statically initialize the on-chip peripheral, using the
DSP56800E_Quick_Start, is the following:
1. Define configuration items (register values) in the configuration file appconfig.h. You can
edit the appconfig.h file manually or with the Graphical Configuration Tool (GCT). For more
information on the GCT, refer to Chapter 7, "Graphical Configuration Tool," and predefined
names of all configuration items can be found in Chapter 5, "On-chip Drivers," .
2. Initialize the selected on-chip peripheral by calling the xx_INIT ioctl command (xx is the
peripheral prefix, for example QT_INIT for Quad Timer, PWM_INIT for Pulse Width
Modulator etc.)
The DSP56800E_Quick_Start also enables to dynamically initialize on-chip peripherals. The
dynamic configuration is fully supported by the ioctl commands. See Chapter 5, "On-chip
Drivers," where all ioctl commands are described.
Tip: If you are editing the configuration file appconfig.h manually, you can copy the template of
all configuration items, intended for the appconfig.h file from the peripheral module header file
<name_of_driver>.h (e.g. intc.h - Interrupt Controller driver include file, pwm.h - Pulse Width
Modulation driver include file, etc.). See Example 4-1 where this template for timer/counter,
extracted from the include file qtimer.h, is shown.
4-2
Targeting 56F8xxx Platform
FREESCALE SEMICONDUCTOR

Advertisement

Table of Contents
loading

Table of Contents