Part 1 - Getting Started
Texas Instruments provides several headers and source files that aid in enabling and using the different peripherals supported by the F2808 DSP (such as CAN, SPI and ADCs). The following is a list of the files essential to the eCAN peripheral. Note that in most applications, several of the other provided files will also be needed to achieve a practical functionality from the F2808.
| DSP280x_Examples.h | Makes includes and defines macros (there is a strong possibility that only a portion of this file is important and could possibly be moved into another header; however, which portion will be left for the reader to determine if so desired). |
| DSP280x_Device.h | Defines some macros for certain assembly commands (such as EALLOW) and includes the peripheral header files. By default, all the peripheral header files are included and therefore must be added to the project; however, the peripheral source files do not need to be added for peripherals not in use. |
| DSP280x_GlobalPrototypes.h | Defines the prototypes for many global functions. |
| DSP280x_DefaultIsr.h/.c | Defines the default Interrupt Service Routines. |
| DSP280x_ECan.h/.c | Defines the structures needed to access the eCAN registers and several functions to initialize it. |
| DSP280x_GlobalVariableDefs.h/.c | Defines important global variables and data section pragmas (which are used to map certain variables to specific parts of memory). |
| DSP280x_PieCtrl.h/c | Defines Peripheral Interrupt Expansion (PIE) control registers and initialization. |
| DSP280x_Device.h/c | Handles system control initialization and defines certain support functions. One aspect of this is to initialize the clocks for the different peripherals. Make sure the initializations for the eCAN clocks are not commented out for some reason. |
| DSP280x_CodeStartBranch.asm | An assembly file that directs how code is to be started after boot. |
Only DSP280x_Examples.h and DSP280x_Device.h need to be included in the main source file of the project as the other files will be included indirectly via these two headers. The easiest way to ensure that all the necessary headers and source files are present in the project is to modify one of the eCAN example projects (such as ECanBack2Back) which are provided by Texas Instruments.
Continue to Part 2, eCAN Programming Conventions...