F2837xD C-Code Header Files
TMS320F2837xD Microcontroller Workshop - Peripherial Registers Header Files 3 - 13
three steps needed to use the header files. The first step is to include this file directly or indirectly
in each source files.
Global Variable Definitions File
With F2837xD_GlobalVariableDefs.c included in the project all the needed variable definitions are
globally defined.
Global Variable Definitions File
F2837xD_GlobalVariableDefs.c
Declares a global instantiation of the structure
for each peripheral
Each structure is placed in its own section using
a DATA_SECTION pragma to allow linking to the
correct memory (see next slide)
Add this file to your CCS project:
F2837xD_GlobalVariableDefs.c
#include "F2837xD_device.h"
…
#pragma DATA_SECTION(EPwm1Regs,“EPwm1RegsFile");
volatile struct EPWM_REGS EPwm1Regs;
…
F2837xD_GlobalVariableDefs.c
The global variable definition file declares a global instantiation of the structure for each
peripheral. Each structure is placed in its own section using a DATA_SECTION pragma to allow
linking to the correct memory. The second step for using the header files is to add
F2837xD_GlobalVariableDefs.c file to your project.