Stay updated with the TI C2000 Real-time Microcontroller blogs
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
- Register Programming Model: Direct Register Access, BitField, DriverLib
- Header File Structure Naming Conventions
- TMS320F28x7x Header Files
- TMS320F28x7x Peripheral Header Files
- TMS320F28x7x Global Variable Definitions File
- TMS320F28x7x Mapping Structures to Memory
The purpose of the F2837xD C-code header files is to simplify the programming of the many peripherals on the F28x device. The F2837xD C-code header files are part of a library consisting of C functions, macros, peripheral structures, and variable definitions. Registers and the bit-fields are represented by structures. C functions and macros are used to initialize or modify the structures (registers).
Register Programming Model: Direct Register Access, BitField, DriverLib
The highest level is DriverLib which are C functions that automatically set the bit fields. The bit field header files are C structures that allow registers to be access whole or by bits and bit fields, and modified without masking. Direct register access is the lowest level where the user code, in C or assembly, defines and access register addresses.
The highest level is DriverLib which are C functions that automatically set the bit fields. The bit field header files are C structures that allow registers to be access whole or by bits and bit fields, and modified without masking. Direct register access is the lowest level where the user code, in C or assembly, defines and access register addresses.


DriverLib: DriverLib performs low-level register manipulation and provides the highest level of abstraction.
Bit Field: The bit field header files define all registers as structures and the bit fields are directly accessible. The structure approach enables efficient compiler use of DP addressing mode and C28x atomic operations.


Direct Register Access: With direct register access, the register addresses are #defined individually and the user must compute the bit-field mask.


Header File Structure Naming Conventions
The header files define all of the peripheral structures, all of the register names, all of the bit field names, and all of the register addresses. The most common naming conventions used are PeripheralName.RegisterName.all, which will access the full 16 or 32-bit register; and PeripheralName.RegisterName.bit.FieldName, which will access the specified bit fields of a register.
The TMS320F28x7x header files define
The header files define all of the peripheral structures, all of the register names, all of the bit field names, and all of the register addresses. The most common naming conventions used are PeripheralName.RegisterName.all, which will access the full 16 or 32-bit register; and PeripheralName.RegisterName.bit.FieldName, which will access the specified bit fields of a register.
The TMS320F28x7x header files define
- All of the peripheral structures
- All of the register names
- All of the bit field names
- All of the register addresses

TMS320F28x7x Header Files
The TMS320F28x7x header file package contains everything needed to use the structure approach. It defines all the peripheral register bits and register addresses. The header file package includes the header files, linker command files, code examples, and documentation. The header file package is available from C2000Ware.
A peripheral is programmed by writing values to a set of registers. Sometimes, individual fields are written to as bits, or as bytes, or as entire words. Unions are used to overlap memory (register) so the contents can be accessed in different ways. The header files group all the registers belonging to a specific peripheral.
C:\ti\c2000\C2000Ware_\device_support\
The TMS320F28x7x header file package contains everything needed to use the structure approach. It defines all the peripheral register bits and register addresses. The header file package includes the header files, linker command files, code examples, and documentation. The header file package is available from C2000Ware.
A peripheral is programmed by writing values to a set of registers. Sometimes, individual fields are written to as bits, or as bytes, or as entire words. Unions are used to overlap memory (register) so the contents can be accessed in different ways. The header files group all the registers belonging to a specific peripheral.
C:\ti\c2000\C2000Ware_
- \f2837xd\headers\include (.h files)
- \f2837xd\headers\cmd (linker .cmd files)
- \f2837xd\examples (CCS examples)
- \f2837xd\docs (documentation)

TMS320F28x7x Peripheral Header Files
The F2837xD_Device.h header file is the main include file. By including this file in the .c source code, all of the peripheral specific .h header files are automatically included. Of course, each specific .h header file can be included individually in an application that does not use all the header files, or you can comment out the ones you do not need. (Also includes typedef statements).
The F2837xD_Device.h header file is the main include file. By including this file in the .c source code, all of the peripheral specific .h header files are automatically included. Of course, each specific .h header file can be included individually in an application that does not use all the header files, or you can comment out the ones you do not need. (Also includes typedef statements).

TMS320F28x7x Global Variable Definitions File
With F2837xD_GlobalVariableDefs.c included in the project all the needed variable definitions are globally defined. 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.
With F2837xD_GlobalVariableDefs.c included in the project all the needed variable definitions are globally defined. 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.
TMS320F28x7x Mapping Structures to Memory
The data structures describe the register set in detail. And, each instance of the data type (i.e., register set) is unique. Each structure is associated with an address in memory. This is done by (1) creating a new section name via a DATA_SECTION pragma, and (2) linking the new section name to a specific memory in the linker command file.
The header file package has two linker command file versions; one for non-BIOS projects and one for BIOS projects. This linker command file is used to link each structure to the address of the peripheral using the structures named section.
The data structures describe the register set in detail. And, each instance of the data type (i.e., register set) is unique. Each structure is associated with an address in memory. This is done by (1) creating a new section name via a DATA_SECTION pragma, and (2) linking the new section name to a specific memory in the linker command file.
The header file package has two linker command file versions; one for non-BIOS projects and one for BIOS projects. This linker command file is used to link each structure to the address of the peripheral using the structures named section.
Back to top of the page
