AN1915D Freescale Semiconductor / Motorola, AN1915D Datasheet - Page 25

no-image

AN1915D

Manufacturer Part Number
AN1915D
Description
3-Phase BLDC Motor Control with Quadrature Encoder using DSP56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MOTOROLA
7.2 Appconfig.h File
7.3 Initialization of Drivers
7.4 Interrupts
7.5 PC Master Software
The BLDC motor control application uses the following library functions:
The purpose of the appconfig.h file is to provide a mechanism for overwriting the default configuration
settings which are defined in the config.h file.
There are two appconfig.h files. The first appconfig.h file is dedicated to External RAM
(..\ConfigExtRam directory) and the second one is dedicated to FLASH memory (..\ConfigFlash
directory). In the case of the BLDC motor control application, both files are identical.
The appconfig.h file can be divided into two sections. The first section defines which components of
the SDK libraries are included in the application; the second part overwrites the standard settings of
the components during their initialization.
Each peripheral on the DSP chip or on the EVM board is accessible through a driver. The driver
initialization of each peripheral used is described in this chapter. For a detailed description of drivers
see the document Embedded SDK Targeting Motorola DSP5680x Platform.
The following steps are required to use the driver:
Access to individual driver functions is provided by the ioctl function call.
The SDK serves the interrupt routine calls and automatically clears interrupt flags. The user defines the
callback functions called during interrupts. The callback functions are assigned during driver
initialization - open(). Callback function assignment is defined as one item of the initialization
structure which is used as a parameter of the function open(). Some drivers define the callback
function in the appconfig.h file.
PC master software was designed to provide an application debugging, diagnostic and demonstration
tool for the development of algorithms and applications. It runs on a PC connected to the DSP EVM
via an RS232 serial cable. A small program resident in the DSP communicates with the PC master
software to parse commands, return status information to the PC and process control information from
the PC. PC master software, executing on a PC, uses part of Microsoft Internet Explorer as the user
interface.
PC master software is part of the Motorola Embedded SDK and may be selectively installed during
SDK installation.
To enable PC master software operation on the DSP target board application, the following lines must
be added to the appconfig.h file:
bldchsCommHandlerComp (BLDC motor commutation algorithm; bldc.lib library)
controllerPItype1 (standard PI controller; mcfunc.lib library)
switchcontrol (switch control; mcfunc.lib library)
Include driver support in the appconfig.h file
Fill the configuration structure in the application code for specific drivers (depends on driver
type)
Initialize the configuration setting in appconfig.h for specific drivers (depends on driver type)
Call the open (create) function
3-Phase BLDC Motor Control with Quadrature Encoder
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
SDK Implementation
25

Related parts for AN1915D