eZdspF2812

所属分类:DSP编程
开发工具:C/C++
文件大小:78KB
下载次数:13
上传日期:2010-05-20 22:02:04
上 传 者rdone
说明:  F2812 应用程序 在flash memory中运行
(This code accompanies the Texas Instruments application report Running an Application from Internal Flash Memory on the TMS320F2812 DSP)

文件列表:
eZdspF2812 (0, 2009-12-28)
eZdspF2812\cmd (0, 2009-12-28)
eZdspF2812\cmd\F2812_BIOS_flash.cmd (1478, 2008-09-29)
eZdspF2812\cmd\F2812_BIOS_ram.cmd (959, 2007-12-18)
eZdspF2812\cmd\F2812_nonBIOS_flash.cmd (3948, 2007-12-27)
eZdspF2812\cmd\F2812_nonBIOS_ram.cmd (3414, 2007-12-27)
eZdspF2812\disclaimer.txt (3746, 2003-09-12)
eZdspF2812\DSP281x_headers (0, 2009-12-28)
eZdspF2812\DSP281x_headers\cmd (0, 2009-12-28)
eZdspF2812\DSP281x_headers\cmd\DSP281x_Headers_BIOS.cmd (4732, 2007-09-26)
eZdspF2812\DSP281x_headers\cmd\DSP281x_Headers_nonBIOS.cmd (4733, 2007-09-26)
eZdspF2812\DSP281x_headers\include (0, 2009-12-28)
eZdspF2812\DSP281x_headers\include\DSP281x_Adc.h (8488, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_CpuTimers.h (5810, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_DefaultIsr.h (4800, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_DevEmu.h (3584, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Device.h (3826, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_ECan.h (46005, 2007-05-01)
eZdspF2812\DSP281x_headers\include\DSP281x_Ev.h (23580, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Gpio.h (29757, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Mcbsp.h (34843, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_PieCtrl.h (5893, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_PieVect.h (6390, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Sci.h (8111, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Spi.h (6151, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_SysCtrl.h (11919, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_Xintf.h (3696, 2007-09-26)
eZdspF2812\DSP281x_headers\include\DSP281x_XIntrupt.h (2169, 2007-09-26)
eZdspF2812\include (0, 2009-12-28)
eZdspF2812\include\DSP281x_DefaultIsr.h (4754, 2005-04-28)
eZdspF2812\include\F2812_example.h (3391, 2008-02-21)
eZdspF2812\projects (0, 2010-01-07)
eZdspF2812\projects\F2812_example_BIOS_flash.pjt (1742, 2008-09-29)
eZdspF2812\projects\f2812_example_BIOS_flash.tcf (8158, 2008-08-11)
eZdspF2812\projects\F2812_example_BIOS_flashcfg.cmd (10584, 2008-09-29)
eZdspF2812\projects\F2812_example_BIOS_ram.pjt (1680, 2008-09-29)
eZdspF2812\projects\f2812_example_BIOS_ram.tcf (6651, 2008-08-11)
eZdspF2812\projects\F2812_example_BIOS_ramcfg.cmd (11472, 2008-08-11)
eZdspF2812\projects\F2812_example_nonBIOS_flash.paf (3482, 2010-01-07)
eZdspF2812\projects\F2812_example_nonBIOS_flash.pjt (1512, 2008-09-29)
... ...

David M. Alter Texas Instruments, Inc. September 29, 2008 ---------------------------------- This code accompanies the Texas Instruments application report "Running an Application from Internal Flash Memory on the TMS320F28xxx DSP," literature #SPRA958. The application report can be downloaded from the TI website, www.ti.com. Please read and understand the disclaimer contained in the file disclaimer.txt. ---------------------------------- These are example code projects for the eZdsp F2812 board. They are complete with all needed files. They have been built and tested using Code Composer Studio v3.3.81.5, C28x C-Compiler v5.1.0, and DSP/BIOS v5.33. Test hardware was an eZdspF2812 development board with revision G silicon. There are four projects: F2812_example_BIOS_ram.pjt - DSP/BIOS project that runs from on-chip RAM F2812_example_BIOS_ram.pjt - DSP/BIOS project that runs from on-chip FLASH F2812_example_nonBIOS_ram.pjt - non-DSP/BIOS project that runs from on-chip RAM F2812_example_nonBIOS_ram.pjt - non-DSP/BIOS project that runs from on-chip FLASH These are just examples of DSP/BIOS and non-DSP/BIOS projects. They have only been given brief tests, and no guarantees are made about their suitability or performance for application useage. The projects all do the following: ---------------------------------- 1) Illustrates F2812 DSP initialization (in function main()). The PLL is configured for x5 mode. 2) Toggles the GPIOF14 pin to blink the LED on the eZdsp F2812 board. In the non-DSP/BIOS projects, this is done in the ADCINT ISR. In the DSP/BIOS projects, a periodic function is used. 3) Configures the ADC to sample on ADCINA0 channel at a 50 kHz rate. 4) Services the ADC interrupt. 5) Sends out 2 kHz symmetric PWM on PWM1 pin. 6) Configures the capture unit #1. 7) Services the capture unit #1 interrupt. Things to know: --------------- 1) The .pjt project files can be found in the \projects directory. After compiling a project, the .out file will be located in the \projects\Debug directory. 2) The \src directory contains code source files common to all projects. Note: not every source file is used by all projects. 3) The \DSP281x_headers\include directory contains include files from the DSP281x Peripherals Structures header file download. All four projects use these structures to program the peripherals in C. The header file download is available from the TI website, literature #SPRC097. Specifically, v1.11 of the header files has been used. The contents of this directory are IDENTICAL to the same directory from the header file download v1.11. In addition, the file DSP280x_GlobalVariableDefs.c has been moved from the \DSP281x_headers\src directory of the header file download to the \src directory of this project. 4a) If using the RAM examples, the F2812 on the eZdsp board needs to be configured for "Jump to H0" bootmode, and also have the PLL jumpered for enable. Check the board jumpers to be: JP1 2-3 (MP/MC*) JP9 1-2 (PLL) JP7 2-3 (boot mode) JP8 2-3 (boot mode) JP11 1-2 (boot mode) JP12 2-3 (boot mode) If this does not seem to be working, check the reference manual for your eZdsp board to confirm the jumper settings. Jumper settings may have changed if the eZdsp board was revised. 4b) If using the FLASH examples, the F2812 on the eZdsp board needs to be configured for "Jump to Flash" bootmode, and also have the PLL jumpered for enable. Check the board jumpers (on revision A, B, or C boards) to be: JP1 2-3 (MP/MC*) JP9 1-2 (PLL) JP7 1-2 (boot mode) JP8 don't care (boot mode) JP11 don't care (boot mode) JP12 don't care (boot mode) If this does not seem to be working, check the reference manual for your eZdsp board to confirm the jumper settings. Jumper settings may have changed if the eZdsp board was revised. 5) The ram example is linking sections in various places that may look unnecessary (e.g., the section ramfuncs is loaded to one ram area, and copied to and run from another ram area. On the surface, this look rather pointless. However, these things were really done in preparation to build the flash project. In reality, a real embedded system cannot run on ram alone. It must have non-volatile memory somewhere. Hence, in the flash system, you will see the same sections being loaded to flash, but copied to and run from ram. 6) The user will reach a point where he will need to modify the linker command file for the project. The linking is actually controlled by three different files: user .cmd file, DSP/BIOS generated .cmd file (for DSP/BIOS projects only), and the DSP28 header file .cmd. The user .cmd file is named f2812_BIOS_ram.cmd, f2812_BIOS_flash.cmd, f2812_nonBIOS_ram.cmd, or f2812_nonBIOS_flash.cmd, depending on which project is used. The DSP/BIOS generated .cmd file is similarly named f2812_BIOS_ramcfg.cmd, f2812_BIOS_flashcfg.cmd, f2812_nonBIOS_ramcfg.cmd, or f2812_nonBIOS_flashcfg.cmd. Finally, the DSP281x header file .cmd file is named either DSP281x_Headers_BIOS.cmd or DSP281x_Headers_nonBIOS.cmd. Be careful modifying the user .cmd file. For DSP/BIOS projects, the RAM and FLASH memory has been defined in the DSP BIOS configuration tool (i.e., in the DSP/BIOS generated .cmd file). The peripheral structure memory and other DSP281x header file related sections is defined in the DSP281x header file .cmd file. There has not been too much attention given to where everything is linked. The goal in writing this example code was simply to get it to work correctly. The linking may need to be tuned to get better performance (e.g., to avoid memory block access contention, or to better manage memory block utilization). 7) For non-DSP/BIOS projects, a complete set of interrupt service routines are defined in the file defaultISR_nonBIOS.c. Each interrupt is executed directly in its hardware ISR. However, with the exception of the ADCINT and CAPINT1, each ISR actually executes an ESTOP0 instruction (emulation stop) to trap spurious interrupts during debug. Note that each ISR is using the "interrupt" keyword which tells the compiler to perform a context save/restore upon function entry/exit. 8) For DSP/BIOS projects, a complete set of (hardware) interrupt service routines are defined in the file DefaultISR_BIOS.c. Each ISR can be hooked to the desired interrupt using the HWI manager in the DSP/BIOS configuration tool. Also, the DSP/BIOS Interrupt Dispatcher can be used to handle the context save/restore, which is why the ISRs are not using the "interrupt" keyword (as in the non-DSP/BIOS case). In these examples, the CAPINT1 ISR is performed directly in the DefaultIsr.c file (as an example of reducing latency), whereas the ADC interrupt function in DefaultIsr_BIOS.c posts a SWI to perform the ADC routine. These are just examples. Note that the CAPINT1 is still using the DSP/BIOS dispatcher to perform context save/restore (as selected in the HWI manager of the configuration tool). If absolute minimum latency is required (for some time critical ISR), one could disable the interrupt dispatcher for that interrupt, and add the "interrupt" keyword to the ISR function declaration. Note that doing so will preclude the user for utilizing any DSP/BIOS functionality in that ISR. ------------ END OF FILE -------------------

近期下载者

相关文件


收藏者