www.ti.com
Software Flow
3
Software Flow
As mentioned, the DMC Systems are highly modular, allowing for re-use and re-targeting. The trade off is
that the modularity can initially be confusing as instead of a single C file, there are many separate files
and functions being called. Let’s look at this by continuing to examine the High Voltage Kit Sensorless
PMSM project. Explore the folder through controlSUITE Desktop - Kits - Kit Folder or directly:
C:\ti\controlSUITE\development_kits\HVMoPfcKit_v1.3\HVPM_Sensorless
3.1
[PROJECT_NAME]-SETTINGS.H
This header file defines global settings for the project, including Incremental build level, system clock
frequency, ISR frequency, and motor parameter settings.
3.2
[PROJECT_NAME]-DEVINIT_[F28XXX].C
Initializes the device and the GPIO mux options (fixed function pins like ADC are already initialized by
default). The DevInit file disables the watchdog timer, sets the clock/PLL, initializes the PIE, and then
configures each GPIO to its own pin function. The DevInit file is target specific and is different based on
the pin-out of the specific device.
3.3
[PROJECT_NAME].H
This is the header file which lists all of the DMCLibrary components that will be used in the project. There
is a section for the device independent MATH blocks as well as the device dependent DRIVERS. When
creating your own project you can directly use the MATH blocks as they exist in the DMCLib controlSUITE
path C:\ti\controlSUITE\libs\app_libs\motor_control\math_blocks
but it is recommended that you place the DRIVERS inside your specific project as they will need to be
customized to your specific implementation. For controlSUITE the first DRIVER implementations were
done for the High Voltage Kit, so those projects also point to the controlSUITE path, but you will notice for
subsequent kits - like the Low Voltage versions - the drivers were brought into the specific project and
modified as needed.
These DRIVER blocks additionally use files located in the controlSUITE\device_support or
controlSUITE\development_kits\~SupportFiles for setting peripheral configuration.
3.4
[PROJECT_NAME].C
Let’s examine the main source file for this project: HVPM_Sensorless.c
The first statements include five header files.
1. PeripheralHeaderIncludes.h: LOCATION:
C:\ti\controlSUITE\development_kits\~SupportFiles\F2803x_headers
PeripheralHeaderIncludes.h is a device specific header file that is chosen based on the include paths
chosen in CCS. This header file is responsible for adding the correct set of F28xxx header files needed
by the target and defining several target specific constants.
2. IQmathLib.h: LOCATION: C:\ti\controlSUITE\libs\math\IQmath
IQmathLib.h is the math library discussed in
Section 2.1
of this document
3. HVPM_Sensorless.h:
Discussed in
Section 3.3
4. HVPM_Sensorless-Settings.h:
Discussed in
Section 3.3
5. math.h: LOCATION: C:\Program Files\Texas Instruments\ccsv4\tools\compiler\C2000 Code
Generation Tools 5.2.7\include
Math.h header file is the standard math and trigonometric functions supported by the Code Generation
tools.
Lines 26 through 108:
Includes function definitions for system initialization, state machine initialization, and variable definitions.
27
SPRUGI6 – September 2010
TMS320C2000 Motor Control Primer
Submit Documentation Feedback
Copyright © 2010, Texas Instruments Incorporated