网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 61IC中国电子在线 >> DSP >> 代码示例 >> TI DSP代码示例 >> C2000 >> 文章正文
  TMS320F2810/F2812(C代码)头文件         ★★★ 【字体:
TMS320F2810/F2812(C代码)头文件
作者:61IC    文章来源:本站原创    点击数:    更新时间:2007-1-16    
Intended for product evaluation purposes
Introduction: _______________________________________________________________________________________2
Packet Contents: ____________________________________________________________________________________2
· Directory structure ____________________________________________________________________________2
· .h definition files ______________________________________________________________________________2
· Global variable definition file ___________________________________________________________________3
· Peripheral Interrupt Expansion (PIE) block support ________________________________________________3
· Example main program ________________________________________________________________________4
· Peripheral specific routines _____________________________________________________________________4
· Example Linker .cmd files ______________________________________________________________________4
· Other source files _____________________________________________________________________________4
· Code Composer .gel Files _______________________________________________________________________5
· Examples ____________________________________________________________________________________5
Steps for Using These Files ____________________________________________________________________________6
Accessing Peripheral Registers _________________________________________________________________________9
Troubleshooting Tips ________________________________________________________________________________11
Variable Names and Data Sections _____________________________________________________________________13
DSP28_Device.h - Main Include File ___________________________________________________________________15
Introduction:
This packet is meant to facilitate writing in C for the F2810/F2812. In the future it will be replaced with a fullfeatured
Chip Support Library (CSL). Note: Programs written with the DSP28 header files are not
guaranteed to be compatible with a future release of CSL.
This packet can be used as-is to provide a platform for writing code examples or the user can pick and choose
which files to use in their own projects and discard the rest.
This packet is currently Alpha quality and is being released for product evaluation purposes.
Packet Contents:
·  Directory structure
o <base directory> ‘28x CCS project file and readme.doc
o <base directory>\doc\ Example documentation
o <base directory>\examples\ Example programs
o <base directory>\gel\ .gel files that are specific to the DSP28 headerfiles
o <base directory>\include\ .h files
o <base directory>\src\ .c source files
o <base directory>\cmd\ linker command files
o <base directory>\debug\ output from the compiler
The DSP28 example files include the following:
·  .h definition files
These files are found in the include\ directory and define structures and bit fields that correspond to each
peripheral and system register on the F2810 and F2812 devices. The following support files fall into this
category:
o DSP28_Device.h DSP28_Device.h is the main include file. By including this one file in any
of your .c source files, you will automatically include all the required
peripheral specific .h files. If you do not want to include a particular file,
simply comment it out. In addition the file includes typedef statements
for data types on any ‘28x device.
o DSP28_DevEmu.h Emulation register definitions – Device ID
o DSP28_SysCtrl.h System register definitions. (Watchdog, PLL, CSM, etc..)
o DSP28_PieCtrl.h PIE control register definitions
o DSP28_Adc.h ADC register definitions
o DSP28_CpuTimers.h CPU timer register definitions
o DSP28_ECan.h Enhanced CAN register definitions
o DSP28_Ev.h Event Manager register definitions
o DSP28_Gpio.h General Purpose I/O register definitions
o DSP28_Mcbsp.h McBSP register definitions
o DSP28_Sci.h SCI register definitions
o DSP28_Spi.h SPI register definitions
o DSP28_Xintf.h External interface register definitions
o DSP28_XIntrupt.h External interrupt register definitions
·  Global variable definition file
The DSP28_GlobalVariableDefs.c file defines all of the variables required to use the above .h files. In
addition, a CODE_SECTION pragma statement is included to define a code section for each variable.
The linker will then use these code sections to link the structure over the peripheral in memory. In this
manner the variable can be used to directly access the register.
o DSP28_GlobalVariableDefs.c
·  Peripheral Interrupt Expansion (PIE) block support
In addition to the register definitions defined in DSP28_PieCtrl.h, this packet provides the basic ISR
structure for the PIE block. These files are:
o DSP28_PieVect.h Example PIE vector table definition. A structure definition of pointers to
functions for the entire 96 vectors in the PIE vector table. This vector
table is populated with pointers to functions as defined in the
corresponding DSP28_PieVect.c file. The initialization routine found in
the corresponding DSP28_PieVect.c file demonstrates how this table is
populated.
o DSP28_PieVect.c Defines the PIE Vector table structure and populates it with pointers to
the ISR routines found in DSP28_DefaultIsr.c
o DSP28_DefaultIsr.c Default ISR routines. These are shell routines for all of the PIE
interrupts. You can populate one of these shell routines with the ISR or
remap your own function into the PIE vector table instead.
o DSP28_DefaultIsr.h Function prototypes for the included ISR shell routines.
In addition, the following files are included for software prioritization of interrupts. These files are used in
place of those above. Refer to the sw_prioritized_interrupts example and documentation information on
their use.
o DSP28_SWPrioritizedPieVect.c PIE Vector table structure
o DSP28_SWPrioritizedDefaultIsr.c Default ISR routines with software prioritization.
o DSP28_SWPrioritizedIsrLevels.h User assigns priority levels in this file.
.
·  Example main program
Example_28xDevice.c file contains a sample main() program for the F2810/F2812. This program shows
the steps for initializing the device. DSP28_InitPeripherals.c contains the peripheral initialization function
used by the example program. All of the examples provided follow the basic flow found in this file.
The example program has a corresponding Example_28xDevice.h file. This file contains the external
function prototypes used by the example program. These external functions can be found in the
peripheral specific .c files found in the src\ directory.
o Example_28xDevice.c
o Example.h
o DSP28_InitPeripherals.c
·  Peripheral specific routines
This support package contains peripheral specific initialization routines and other support functions.
These functions can be found in the peripheral .c files in the src\ directory. These files include:
o DSP28_SysCtrl.c
o DSP28_PieCtrl.c
o DSP28_Adc.c
o DSP28_CpuTimers.c
o DSP28_ECan.c
o DSP28_Ev.c
o DSP28_Gpio.c
o DSP28_Mcbsp.c
o DSP28_Sci.c
o DSP28_Spi.c
o DSP28_Xintf.c
o DSP28_XIntrupt.c
Note: The example routines are under development and may not all be available as of this release.
They will be added and distributed as more examples are developed.
·  Example Linker .cmd files
The cmd\ directory contains example linker command files. These files contain the memory allocation for
all of the peripheral structure definitions that are included in this support package.
The following .cmd files are provided as examples. For getting started the basic EzDSP_RAM_lnk.cmd
file is suggested:
o EzDSP_RAM_lnk.cmd Simple memory map that only uses RAM locations. This memory map is
used for all of the examples for use with the F2812 EzDSP. No Flash or
OTP locations are used.
o F2810.cmd, F2812.cmd Example memory maps for advanced/later development with Flash
included.
·  Other source files
o DSP28_CodeStartBranch.asm Branch statement used to redirect code execution when booting
to Flash. Refer to the flash example for usage.
o DSP28_DBGIER.asm Assembly function to manipulate the DEBIER register from C
o DSP28_usDelay.asm Macro to specify a delay in microseconds. Refer to
/examples/adc for an example of its use.
·  Code Composer .gel Files
o DSP28_Peripheral.gel This .gel file provides GEL pull-down menus to load the DSP28
data structures into the watch window. You may want to have
CCS load this file automatically by adding a
GEL_LoadGel(“<base_path>/gel/DSP28peripheral.gel”)
function to the standard F2812.gel that was included with CCS.
o DSP28_GpioQuickRef.gel This .gel file provides a quick reference for the GPIO ports on the
F2810/12. It simply prints out the mux information into a
debugger window.
·  Examples
In the DSP28/examples directory there are example projects that use the DSP28 headerfiles as a
framework. More examples will be added in future revisions.
In general, each example is documented in the code comments at the top of the main source file. This
includes information on any special hardware settings or conditions that must be met for the test to run
properly. These tests are self-validating and can be used to check the health of the hardware or
demonstrate how to setup a peripheral.
Each example includes a Code Composer Studio project (.pjt) that should be used to build the .out file.
Most examples also include a .gel file to help facilitate building and loading the example.
The examples use the header files found in the top level DSP28/include directory and some source files
in the top level DSP28/src directory. Only files specific to that particular example are in the appropriate
example directory - the shared files remain in the top level. This is done by providing the proper include
path in the project file.
If you wish to modify the examples it is suggested that you make a copy of the entire DSP28 packet to
modify. New examples provided will assume that the base files are as supplied.
Note: Most of the example code included uses the .bit field structures to access registers. This is done to
help the user learn how to use the device. Using the bit fields has the advantage of yielding code that is
easier to read and modify. This method will result in a slight code overhead when compared to using the
.all method. In addition, for these examples the compiler optimizer has not been turned on.
Steps for Using These Files
The following steps provide a high-level overview for using these support files to create your own projects.
1. Include the DSP28_Device.h file in any source file in which you want to use the register definitions:
#include “DSP28_Device.h”
This file will in-turn include all of the device peripheral .h files and required definitions.
2. In DSP28_Device.h, select the target you are building for:
//---------------------------------------------------------------------------
// User To Select Target Device:
#define F2812 TARGET
#define F2810 0
3. Include DSP28_GlobalVariableDefs.c in your project. This file will define all of the variables and data
sections required to access the peripheral registers directly as variables.
This includes:
‰ Variables that are used to access the peripheral registers. You can use this same variable name in other
.c source files to access the same peripheral registers.
‰ Data sections that are used by the linker to place the variables in the proper locations in memory. These
locations correspond to the memory address of the peripheral registers and will be defined in the linker
.cmd file (see step 4).
For example, for the CPU Timers:
// Define data sections for each of the variables
#pragma DATA_SECTION(CpuTimer0Regs,"CpuTimer0RegsFile");
#pragma DATA_SECTION(CpuTimer1Regs,"CpuTimer1RegsFile");
#pragma DATA_SECTION(CpuTimer2Regs,"CpuTimer2RegsFile");
// Define a variable to access each of the CPU Timer register sets
volatile struct CPUTIMER_REGS CpuTimer0Regs;
volatile struct CPUTIMER_REGS CpuTimer1Regs;
volatile struct CPUTIMER_REGS CpuTimer2Regs;
The volatile keyword tells the compiler that those registers may change due to some event outside of the
code. This keeps the compiler from optimizing out parts of the code that do not appear necessary. For
example, if you wanted to poll a bit, the compiler may only check the bit once unless the location is defined as
volatile.
In this case CpuTimer0Regs, CpuTimer1Regs and CpuTimer2Regs are all defined as variables of type
CPUTIMER_REGS.
CPUTIMER_REGS is a structure defined within the DSP28_CpuTimer.h file. This structure contains all the
registers that belong to a CPU-Timer peripheral. Since each of the three CPU Timers has the same registers,
we can use the same definition for each of the three CPU Timers.
4. Update your the linker cmd file or use one of the example .cmd files provided. The following .cmd files are
provided as examples. For getting started the basic EzDSP_RAM_lnk.cmd file is suggested:
EzDSP_RAM_lnk.cmd Simple memory map that only uses RAM locations. This memory map is
used for all of the examples shipped with the F2812 EzDSP.
No Flash or OTP locations are used.
F2810.cmd
F2812.cmd
Example memory maps for advanced/later development.
Your linker .cmd file should include:
‰ Reserve memory blocks on page 1 for all of the peripheral register file locations. These memory
allocations enable the ‘28x linker to place variables at that exact location in memory. The
memory allocation for the three CPU Timers is shown below. Refer to the example .cmd file for
the other required memory allocations.
Memory
{
……
PAGE 1 :
……
CPU_TIMER0 : origin = 0x000C00, length = 0x000008
CPU_TIMER1 : origin = 0x000C08, length = 0x000008
CPU_TIMER2 : origin = 0x000C10, length = 0x000008
…… etc
……
}
‰ A corresponding section assignment to the proper memory region defined for each of the
peripheral register structures. Recall that in step 3 we showed how the variables are assigned a
particular data section using a #pragma statement such as:
#pragma DATA_SECTION(CpuTimer0Regs,"CpuTimer0RegsFile");
The section assignment will place the defined data section “CpuTimer0RegsFile” in memory
where the peripheral registers are located. Now the variable CPUTimer0Regs, which is the only
variable within that data section, will be located over-laid on top of the memory-mapped registers.
Thus the variable CpuTimer0Regs can be used to access the registers directly from C-code.
SECTIONS
{
……
CpuTimer0RegsFile : > CPU_TIMER0, PAGE = 1
CpuTimer1RegsFile : > CPU_TIMER1, PAGE = 1
CpuTimer2RegsFile : > CPU_TIMER2, PAGE = 1
……
}
The required memory allocations and section assignments are shown in the EzDSP_RAM_lnk.cmd linker
command file.
5. Include .c files for the PIE. If you are going to use the PIE block, you will probably want to include the PIE
support .c files to help with initializing the PIE. The shell ISR functions can be used directly or you can remap
your own function into the PIE vector table provided.
6. If you want to use the example .c files, then include them in your project as well.
7. Follow the steps outlined in the DSP28_Example.c file for initializing peripherals and the PIE block.
Accessing Peripheral Registers
As described earlier, the peripheral register structure defined in the .h files for each peripheral will be linked into
memory at the address where those registers are located. Therefore the variables can be used to access the
registers directly via c-code. This section describes how this works in greater detail.
Taking a closer look at the CPU Timer example. Recall the variables defined are of the type
struct CPUTIMER_REGS.
volatile struct CPUTIMER_REGS CpuTimer0Regs;
volatile struct CPUTIMER_REGS CpuTimer1Regs;
volatile struct CPUTIMER_REGS CpuTimer2Regs;
Lets take a closer look at what this structure looks like. It can be found in the DSP28_CpuTimers.h file:
//----------------------------------------------------
// CPU Timer Register File:
//
struct CPUTIMER_REGS {
union TIM_GROUP TIM; // Timer counter register
union PRD_GROUP PRD; // Period register
union TCR_REG TCR; // Timer control register
Uint16 rsvd1; // reserved
union TPR_REG TPR; // Timer pre-scale low
union TPRH_REG TPRH; // Timer pre-scale high
};
Notice:
‰ The register names within the structure are in the same order as the registers are arranged in
memory. You can observe this by comparing the CPU Timer registers shown in the datasheet to the
above structure.
‰ Locations that are reserved in memory are held within the structure by a reserved variable (rsvd1,
rsvd2, rsvd3 etc). These locations are not used other then to hold the space.
‰ Uint16 is a typedef for an unsigned 16-bit value or, in the case of the ‘28x, an unsigned int. This is
done for portability and the typedef statement can be found in the DSP28_Device.h file.
‰ Registers that are often accessed more then one way (ie by bit, or 16-bits or 32-bits) are defined
using unions. Note: Some registers do not have unions defined since it does not make sense to
access them as bit fields.
Consider an example using the CPU Timer control register. First, all the bits within the register are
defined using a bit field structure as defined in the DSP28_CpuTimer.h file and shown:
struct TCR_BITS { // bits description
Uint16 OUTSTS:1; // 0 Current state of TOUT
Uint16 FORCE:1; // 1 Force TOUT
Uint16 POL:1; // 2 Output polarity
Uint16 TOG:1; // 3 Output toggle mode
Uint16 TSS:1; // 4 Timer Start/Stop
Uint16 TRB:1; // 5 Timer reload
Uint16 FRCEN:1; // 6 Force enable
Uint16 PWIDTH:3; // 9:7 BitTOUT output pulse width
Uint16 SOFT:1; // 10 Emulation modes
Uint16 FREE:1; // 11
Uint16 rsvd:2; // 12:13 reserved
Uint16 TIE:1; // 14 Output enable
Uint16 TIF:1; // 15 Interrupt flag
};
This bit field definition allows the user to identify any bit within the register. But the user may have a
reason to access more then one bit at a time or the whole register at once. To accomplish this, a
union is used to define the register more then one way. For example:
union TCR_REG {
Uint16 all;
struct TCR_BITS bit;
};
Notice that this union was included in the CPUTIMER_REGS definition. Now the user can
access the bit fields by using the .bit element or the whole register by using the .all element. When
accessing bit fields in this manner, a decimal number should be used. For example:
Start CPU-Timer 0:
// CPU Timer0 clear the TSS bit in the TCR register
CpuTimer0Regs.TCR.bit.TSS = 0;
Stop CPU-Timer 1:
// CPU Timer1: Set the TSS bit in the TCR register
CpuTimer1Regs.TCR.bit.TSS = 1;
Reload CPU-Timer 2 Period:
// CPU Timer2: Set the TRB bit in the TCR register
CpuTimer2Regs.TCR.bit.TRB = 1;
When using Code Composer Studio, the editor will prompt you with a list of possible structure/bit field
elements as you type. This auto completion feature makes it easier to code without having to refer to
documentation for the register and bit field names.
If you make a number of accesses to one register using the .bit field, it may result in more code then
using .all to write to the register all at once. For example:
CpuTimer0Regs.TCR.bit.POL = 0; // 0 = Pulse Low
CpuTimer0Regs.TCR.bit.TOG = 0; // 0 = No Toggle
CpuTimer0Regs.TCR.bit.TSS = 1; // 1 = Stop timer
CpuTimer0Regs.TCR.bit.TRB = 1; // 1 = reload timer
CpuTimer0Regs.TCR.bit.FRCEN = 0; // Force output enable (not used)
CpuTimer0Regs.TCR.bit.PWIDTH = 7; // 7+1 = 8 SYSCLKOUT pulse width
CpuTimer0Regs.TCR.bit.SOFT = 1;
CpuTimer2Regs.TCR.bit.FREE = 1; // Timer Free Run
CpuTimer2Regs.TCR.bit.TIE = 1; // 1 = Enable Timer Interrupt
Results in very readable code that is very easy to modify. The penalty is slight code overhead. If
code size is more of a concern then use the .all directive to write to the register all at once.
CpuTimer0Regs.TCR.all = 0x1234
Note: Most of the example code included uses the .bit field structures to access registers. This is
done to help the user learn how to use the device. Using the bit fields will result in a slight code
overhead but makes the examples more readable and easy to change. In addition, for these
examples the compiler optimizer has not been turned on.
Troubleshooting Tips
‰ EALLOW Protection: The EALLOW bit protects some registers from spurious writes by the CPU. If your
program seems unable to write to a register, then check to see if it is EALLOW protected. If it is, then enable
access using the EALLOW instruction. For example:
void WatchDogDisable()
{
EALLOW; // Allow access
SysCtrlRegs.WDCR = 0x0068; // Disable watchdog module
EDIS; // Disallow access
}
‰ The eCAN control registers require 32-bit write accesses. The compiler will instead make a 16-bit write
accesses if it can in order to improve codesize and/or performance. This can result in unpredictable results.
One method to avoid this is to create a duplicate copy of the eCAN control registers in RAM. Use this copy
as a shadow register. First copy the contents of the eCAN register you want to modify into the shadow
register. Make the changes to the shadow register and then write the data back as a 32-bit value.
For example:
volatile struct ECAN_REGS ECanaRegs; // eCAN Control
struct ECAN_REGS ShadowEcana; // Shadow Registers
ShadowEcana.CANME = ECanaRegs.CANME; // Copy to the shadow registers
ShadowEcana.CANME.ME13 = 1; // Set the desired bit
ECanaRegs.CANME = ShadowEcana.CANME; // Write the 32-bit value back
‰ Effects of read-modify-write instructions. When writing any code, whether it be C or assembly, keep in
mind the effects of read-modify-write instructions.
The ‘28x DSP will write to registers or memory locations 16 or 32-bits at a time. Any instruction that seems to
write to a single bit is actually reading the register, modifying the single bit, and then writing back the results.
This is referred to as a read-modify-write instruction. For most registers this operation does not pose a
problem. A notable exception is:
Registers with multiple flag bits in which writing a 1 clears that flag.
For example, consider the PIEACK register. Bits within this register are cleared when writing a 1 to that bit. If
more then one bit is set, performing a read-modify-write on the register may clear more bits then intended.
Incorrect, this solution will write a 1 to any bit set and thus clear all of them:
PieCtrl.PIEAck.bit.Ack1 = 1; // May clear more bits!!!
A better solution is to instead write a mask value to the register in which only the intended bit will have a 1
written to it:
CORRECT: #define PIEACK_GROUP1 0x0001
……
PieCtrl.PIEACK.all = PIEACK_GROUP1;
Registers with Volatile Bits.
Some registers have volatile bits that can be set by external hardware.
Consider the PIEIFRx registers. An atomic read-modify-write instruction will read the 16-bit register, modify
the value and then write it back. During the modify portion of the operation a bit in the PIEIFRx register could
change due to an external hardware event and thus the value may get corrupted during the write.
The rule for registers of this nature is to never modify them during runtime. Let the CPU take the interrupt and
clear the IFR flag.
Variable Names and Data Sections
This section is a summary of the variable names used and data sections allocated by the
DSP28_GlobalVariableDefs.c file.
If you want to use these definitions in your c files then include DSP28_GlobalVariableDefs.c in your
project as well.
#pragma DATA_SECTION(SysCtrlRegs,"SysCtrlRegsFile");
volatile struct SYS_CTRL_REGS SysCtrlRegs; // System Control
#pragma DATA_SECTION(CsmRegs,"CsmRegsFile");
volatile struct CSM_REGS CsmRegs; // Code Security Module
#pragma DATA_SECTION(CsmPwl,"CsmPwlFile");
volatile struct CSM_PWL CsmPwl; // CSM password locations
#pragma DATA_SECTION(FlashRegs,"FlashRegsFile");
volatile struct FLASH_REGS FlashRegs; // Flash registers
#pragma DATA_SECTION(CpuTimer0Regs,"CpuTimer0RegsFile");
volatile struct CPUTIMER_REGS CpuTimer0Regs; // CPU Timer 0
#pragma DATA_SECTION(CpuTimer1Regs,"CpuTimer1RegsFile");
volatile struct CPUTIMER_REGS CpuTimer1Regs; // CPU Timer 1
#pragma DATA_SECTION(CpuTimer2Regs,"CpuTimer2RegsFile");
volatile struct CPUTIMER_REGS CpuTimer2Regs; // CPU Timer 2
#pragma DATA_SECTION(GpioDataRegs,"GpioDataRegs");
volatile struct GPIO_DATA_REGS GpioDataRegs; // GP I/O Data
#pragma DATA_SECTION(GpioMuxRegs,"GpioMuxRegs");
volatile struct GPIO_MUX_REGS GpioMuxRegs; // GP I/O Mux
#pragma DATA_SECTION(ECanaRegs,"ECanaRegsFile");
volatile struct ECAN_REGS ECanaRegs; // eCAN Control
#pragma DATA_SECTION(ECanaMboxes,"ECanaMboxesFile");
volatile struct ECAN_MBOXES ECanaMboxes; // eCAN Mailboxes
#pragma DATA_SECTION(McbspaRegs,"McbspaRegsFile");
volatile struct MCBSP_REGS McbspaRegs; // McBSP
#pragma DATA_SECTION(SpiaRegs,"SpiaRegsFile");
volatile struct SPI_REGS SpiaRegs; // SPI-A
#pragma DATA_SECTION(SciaRegs,"SciaRegsFile");
volatile struct SCIA_REGS SciaRegs; // SCI-A
#pragma DATA_SECTION(EvaRegs,"EvaRegsFile");
volatile struct EVA_REGS EvaRegs; // Event Manager A
#pragma DATA_SECTION(EvbRegs,"EvbRegsFile");
volatile struct EVB_REGS EvbRegs; // Event Manager B
#pragma DATA_SECTION(XintfRegs,"XintfRegsFile");
volatile struct XINTF_REGS XintfRegs; // External Interface
#pragma DATA_SECTION(AdcRegs,"AdcRegsFile");
volatile struct ADC_REGS AdcRegs; // ADC
#pragma DATA_SECTION(XIntruptRegs,"XIntruptRegsFile");
volatile struct XINTRUPT_REGS XIntruptRegs; // External Interrupts
#pragma DATA_SECTION(PieCtrlRegs,"PieCtrlRegsFile");
volatile struct PIE_CTRL_REGS PieCtrlRegs; // PIE Control Registers
#pragma DATA_SECTION(PieVectTable,"PieVectTable");
struct PIE_VECT_TABLE PieVectTable; // PIE Vector Table
DSP28_Device.h - Main Include File
This file can be included in all other .c files. By doing so, all of the other peripheral and interrupt definitions will be
included in the project.
This DSP28_Device.h includes:
‰ Common definitions for ‘28xx devices.
‰ Interrupt mask definitions.
‰ Typedef statements for common data type sizes. Use these to help keep code portable:
ƒ typedef int int16;
ƒ typedef long int32;
ƒ typedef unsigned int Uint16;
ƒ typedef unsigned long Uint32;
‰ Include statements for all provided peripheral and system .h files. These .h files include register bit
definitions for each peripheral.
ƒ #include "DSP28_SysCtrl.h" // System Control/Power Modes
ƒ #include "DSP28_DevEmu.h" // Device Emulation Registers
ƒ #include "DSP28_Xintf.h" // External Interface Registers
ƒ #include "DSP28_CpuTimers.h" // 32-bit CPU Timers
ƒ #include "DSP28_PieCtrl.h" // PIE Control Registers
ƒ #include "DSP28_PieVect.h" // PIE Vector Table
ƒ #include "DSP28_DefaultIsr.h" // Software Prioritization for PIE Interrupts
ƒ #include "DSP28_Spi.h" // SPI Registers
ƒ #include "DSP28_Sci.h" // SCI Registers
ƒ #include "DSP28_Mcbsp.h" // McBSP Registers
ƒ #include "DSP28_ECan.h" // Enhanced eCAN Registers
ƒ #include "DSP28_Gpio.h" // General Purpose I/O Registers
‰ Assembly inline statements for common operations such as enable/disable global interrupts
ƒ extern cregister volatile unsigned int IFR;
ƒ extern cregister volatile unsigned int IER;
ƒ #define EINT asm(" clrc INTM")
ƒ #define DINT asm(" setc INTM")
ƒ #define ERTM asm(" clrc DBGM")
ƒ #define DRTM asm(" setc DBGM")
ƒ #define EALLOW asm(" EALLOW")
ƒ #define EDIS asm(" EDIS")
ƒ #define ESTOP0 asm(" ESTOP0")
               欢迎点击进入:TI德州中文网   (国内唯一针对TI应用的中文技术网站)    文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    TMS320F2812的SPWM原程序
    基于LabVIEW和TMS320F2812的…
    TMS320F2812的CAN调试成功经…
    基于TMS320F2812和μC/OS II…
    TMS320F2812 全局汇编函数
    TMS320F2812 CMD 文件各段含…
    基于TMS320F2812集中供电系统…
    TMS320F2812的CMD文件配置详…
    基于TMS320F2812的多轴伺服控…
    利用TMS320F2812 DSP&DRV592…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61IC 湘ICP备05002478号