亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? example_281xflash.c

?? dsp 2812測(cè)試程序
?? C
字號(hào):
//###########################################################################
//
// FILE:   DSP28_281xFlash.c
//
// TITLE:  DSP281x Flash example.
//
// ASSUMPTIONS:
//
//          This program requires the DSP281x V1.00 header files.  
//          As supplied, this project is configured for "boot to Flash" operation.   
//
//          This example runs the EV Timer Period example from the 
//          Flash.  
//
//          1) Build the project
//          2) Flash the .out file into the device.  This program will fit on 
//             an F2812 or an F2810
//          3) Set the hardware jumpers to boot to Flash 
//          4) Use the included GEL file to load the project, symbols 
//             defined within the project and the variables into the watch
//             window.   
//
//          Steps that were taken to convert the EV example from RAM 
//          to Flash execution:
//
//          - Change the linker cmd file to reflect the flash memory map.
//            This example uses the DSP281x F2812.cmd file.
//          - Make sure any initialized sections are mapped to Flash.  
//            In SDFlash utility this can be checked by the View->Coff/Hex
//            status utility. Any section marked as "load" should be
//            allocated to Flash.
//          - Make sure there is a branch instruction from the entry to Flash
//            at 0x3F7FF6 to the beginning of code execution. This example
//            uses the DSP281x_CodeStartBranch.asm file to accomplish this.
//          - Set boot mode Jumpers to "boot to Flash"
//          - For best performance from the flash, modify the waitstates
//            and enable the flash pipeline as shown in this example.
//            Note: any code that manipulates the flash waitstate and pipeline
//            control must be run from RAM. Thus these functions are located
//            in their own memory section called ramfuncs.
// 
// DESCRIPTION:
//
//          This program sets up EVA Timer 1, EVA Timer 2, EVB Timer 3
//          and EVB Timer 4 to fire an interrupt on a period overflow.  
//          A count is kept each time each interrupt passes through
//          the interrupt service routine. 
//
//          EVA Timer 1 has the shortest period while EVB Timer4 has the
//          longest period.
//
//          ISR Locations:
//                eva_timer1_isr  executed from RAM, puts flash in sleep mode
//                eva_timer2_isr  executed from RAM, puts flash in standby mode
//                evb_timer3_isr  executed from RAM, puts flash in sleep mode
//                                              and later moves it to standby
//                evb_timer4_isr  executed from FLASH
//        
//          Watch Variables:
//
//                EvaTimer1InterruptCount;
//                EvaTimer2InterruptCount;
//                EvbTimer3InterruptCount;
//                EvbTimer4InterruptCount;
//
//###########################################################################
//
//  Ver | dd mmm yyyy | Who  | Description of changes
// =====|=============|======|===============================================
//  1.00| 11 Sep 2003 | L.H. | Changes since previous version (v.58 Alpha)
//      |             |      | Updated comments with info on converting
//      |             |      |   a project to flash.
//      |             |      | Changed the method for copying code from
//      |             |      |    XINTF to internal RAM via the MemCopy
//      |             |      |    function and symbols created by the 
//      |             |      |    linker.
//###########################################################################

#include "DSP281x_Device.h"     // DSP281x Headerfile Include File
#include "DSP281x_Examples.h"   // DSP281x Examples Include File

// Functions that will be run from RAM need to be assigned to 
// a different section.  This section will then be mapped using
// the linker cmd file.
#pragma CODE_SECTION(eva_timer1_isr, "ramfuncs");
#pragma CODE_SECTION(eva_timer2_isr, "ramfuncs");
#pragma CODE_SECTION(evb_timer3_isr, "ramfuncs");

// Prototype statements for functions found within this file.
interrupt void eva_timer1_isr(void);
interrupt void eva_timer2_isr(void);
interrupt void evb_timer3_isr(void);
interrupt void evb_timer4_isr(void);
void init_eva_timer1(void);
void init_eva_timer2(void);
void init_evb_timer3(void);
void init_evb_timer4(void);

// Global variables used in this example
Uint32 EvaTimer1InterruptCount;
Uint32 EvaTimer2InterruptCount;
Uint32 EvbTimer3InterruptCount;
Uint32 EvbTimer4InterruptCount;
Uint32 LoopCount;

// These are defined by the linker (see F2812.cmd)
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;


void main(void)
{
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP281x_SysCtrl.c file.
   InitSysCtrl();
   
// Step 2. Initalize GPIO: 
// This example function is found in the DSP281x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
// InitGpio();  // Skipped for this example  

// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts 
   DINT;

// Initialize PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.  
// This function is found in the DSP281x_PieCtrl.c file.
   InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
   IER = 0x0000;
   IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt 
// Service Routines (ISR).  
// This will populate the entire table, even if the interrupt
// is not used in this example.  This is useful for debug purposes.
// The shell ISR routines are found in DSP281x_DefaultIsr.c.
// This function is found in DSP281x_PieVect.c.
   InitPieVectTable();

// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.  	
   EALLOW;  // This is needed to write to EALLOW protected registers
   PieVectTable.T1PINT = &eva_timer1_isr;
   PieVectTable.T2PINT = &eva_timer2_isr;
   PieVectTable.T3PINT = &evb_timer3_isr;
   PieVectTable.T4PINT = &evb_timer4_isr;
   EDIS;   // This is needed to disable write to EALLOW protected registers

// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP281x_InitPeripherals.c
// InitPeripherals(); // Not required for this example
   init_eva_timer1();
   init_eva_timer2();
   init_evb_timer3();
   init_evb_timer4();
     
// Step 5. User specific code, enable interrupts:

// Copy time critical code and Flash setup code to RAM
// This includes the following ISR functions: EvaTimer1(), EvaTimer2()
// EvbTimer3 and and InitFlash();
// The  RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the F2812.cmd file. 
   MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
   InitFlash();

   // Initialize count values to 0
   EvaTimer1InterruptCount = 0;
   EvaTimer2InterruptCount = 0;
   EvbTimer3InterruptCount = 0;
   EvbTimer4InterruptCount = 0;
   LoopCount = 0;
 

   // Enable PIE group 2 interrupt 4 for T1PINT
   PieCtrlRegs.PIEIER2.all = M_INT4;
   // Enable PIE group 3 interrupt 1 for T2PINT
   PieCtrlRegs.PIEIER3.all = M_INT1;    
   // Enable PIE group 4 interrupt 4 for T3PINT
   PieCtrlRegs.PIEIER4.all = M_INT4;
   // Enable PIE group 5 interrupt 1 for T4PINT
   PieCtrlRegs.PIEIER5.all = M_INT1;

   // Enable CPU INT2 for T1PINT, INT3 for T2PINT, INT4 for T3PINT
   // and INT5 for T4PINT:
   IER |= (M_INT2 | M_INT3 | M_INT4 | M_INT5);

   // Enable global Interrupts and higher priority real-time debug events:

   EINT;   // Enable Global interrupt INTM
   ERTM;   // Enable Global realtime interrupt DBGM

// Step 6. IDLE loop. Just sit and loop forever:	
   while(1)
   {
       LoopCount++;
   }

} 
 

void init_eva_timer1(void)
{
    // Initialize EVA Timer 1:
    // Setup Timer 1 Registers (EV A)
    EvaRegs.GPTCONA.all = 0;
   
    // Set the Period for the GP timer 1 to 0x0200;
    EvaRegs.T1PR = 0x0200;       // Period
    EvaRegs.T1CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 1
    // Count up, x128, internal clk, enable compare, use own period
    EvaRegs.EVAIMRA.bit.T1PINT = 1;
    EvaRegs.EVAIFRA.bit.T1PINT = 1;

    // Clear the counter for GP timer 1
    EvaRegs.T1CNT = 0x0000;
    EvaRegs.T1CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 1 Period interrupt
    EvaRegs.GPTCONA.bit.T1TOADC = 2;

}

void init_eva_timer2(void)
{
    // Initialize EVA Timer 2:
    // Setup Timer 2 Registers (EV A)
    EvaRegs.GPTCONA.all = 0;
   
    // Set the Period for the GP timer 2 to 0x0200;
    EvaRegs.T2PR = 0x0400;       // Period
    EvaRegs.T2CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 2
    // Count up, x128, internal clk, enable compare, use own period
    EvaRegs.EVAIMRB.bit.T2PINT = 1;
    EvaRegs.EVAIFRB.bit.T2PINT = 1;

    // Clear the counter for GP timer 2
    EvaRegs.T2CNT = 0x0000;
    EvaRegs.T2CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 2 Period interrupt
    EvaRegs.GPTCONA.bit.T2TOADC = 2;
}

void init_evb_timer3(void)
{
    // Initialize EVB Timer 3:
    // Setup Timer 3 Registers (EV B)
    EvbRegs.GPTCONB.all = 0;
   
    // Set the Period for the GP timer 3 to 0x0200;
    EvbRegs.T3PR = 0x0800;       // Period
    EvbRegs.T3CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 3
    // Count up, x128, internal clk, enable compare, use own period
    EvbRegs.EVBIMRA.bit.T3PINT = 1;
    EvbRegs.EVBIFRA.bit.T3PINT = 1;

    // Clear the counter for GP timer 3
    EvbRegs.T3CNT = 0x0000;
    EvbRegs.T3CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 3 Period interrupt
    EvbRegs.GPTCONB.bit.T3TOADC = 2;
}

void init_evb_timer4(void)
{
    // Initialize EVB Timer 4:
    // Setup Timer 4 Registers (EV B)
    EvbRegs.GPTCONB.all = 0;
   
    // Set the Period for the GP timer 4 to 0x0200;
    EvbRegs.T4PR = 0x1000;       // Period
    EvbRegs.T4CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 4
    // Count up, x128, internal clk, enable compare, use own period
    EvbRegs.EVBIMRB.bit.T4PINT = 1;
    EvbRegs.EVBIFRB.bit.T4PINT = 1;

    // Clear the counter for GP timer 4
    EvbRegs.T4CNT = 0x0000;
    EvbRegs.T4CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 4 Period interrupt
    EvbRegs.GPTCONB.bit.T4TOADC = 2;
} 
 
// This ISR MUST be executed from RAM as it will put the Flash into Sleep
interrupt void eva_timer1_isr(void)
{
    Uint16 i;

    // Put the Flash to sleep
    FlashRegs.FPWR.bit.PWR = FLASH_SLEEP; 
    
    EvaTimer1InterruptCount++;
    // Short Delay to simulate some ISR Code
    for(i = 1; i < 0x03FF; i++) {}

    // Enable more interrupts from this timer
    EvaRegs.EVAIMRA.bit.T1PINT = 1;

    // Note: To be safe, use a mask value to write to the entire
    // EVAIFRA register.  Writing to one bit will cause a read-modify-write
    // operation that may have the result of writing 1's to clear 
    // bits other then those intended. 
    EvaRegs.EVAIFRA.all = BIT7;

    // Acknowledge interrupt to receive more interrupts from PIE group 2
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP2;
}

// This ISR MUST be executed from RAM as it will put the Flash into Standby
interrupt void eva_timer2_isr(void)
{
    Uint16 i;

    // Put the Flash into standby
    FlashRegs.FPWR.bit.PWR = FLASH_STANDBY; 

    EvaTimer2InterruptCount++;

    // Short Delay to simulate some ISR Code
    for(i = 1; i < 0x02FF; i++) {}

    // Enable more interrupts from this timer
    EvaRegs.EVAIMRB.bit.T2PINT = 1;

   // Note: To be safe, use a mask value to write to the entire
   // EVAIFRB register.  Writing to one bit will cause a read-modify-write
   // operation that may have the result of writing 1's to clear 
   // bits other then those intended. 
   EvaRegs.EVAIFRB.all = BIT0;

   // Acknowledge interrupt to recieve more interrupts from PIE group 3
   PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}

// This ISR MUST be executed from RAM as it will put the Flash to sleep
// and then later move it to Standby
interrupt void evb_timer3_isr(void)
{

    Uint16 i;

    // Put the Flash to sleep
    FlashRegs.FPWR.bit.PWR = FLASH_SLEEP; 

    EvbTimer3InterruptCount++;

    // Short Delay to simulate some ISR Code
    for(i = 1; i < 0x01FF; i++) {}

    // Sometime later, move the Flash to standby
    FlashRegs.FPWR.bit.PWR = FLASH_STANDBY; 

    // Note: To be safe, use a mask value to write to the entire
    // EVBIFRA register.  Writing to one bit will cause a read-modify-write
    // operation that may have the result of writing 1's to clear 
    // bits other then those intended. 
    EvbRegs.EVBIFRA.all = BIT7;

    // Acknowledge interrupt to receive more interrupts from PIE group 4
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP4;

}

// This ISR will be executed out of Flash 
interrupt void evb_timer4_isr(void)
{

    Uint16 i;
    
    EvbTimer4InterruptCount++;

    // Short Delay to simulate some ISR Code
    for(i = 1; i < 0x00FF; i++) {}
 
    // Note: To be safe, use a mask value to write to the entire
    // EVBIFRB register.  Writing to one bit will cause a read-modify-write
    // operation that may have the result of writing 1's to clear 
    // bits other then those intended. 
    EvbRegs.EVBIFRB.all = BIT0;	

    // Acknowledge interrupt to recieve more interrupts from PIE group 5
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP5;

}


//===========================================================================
// No more.
//===========================================================================

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精彩视频在线观看| 综合欧美亚洲日本| 欧美va亚洲va| 2019国产精品| 久久久高清一区二区三区| 精品国产成人在线影院| 久久夜色精品国产噜噜av| 国产偷国产偷精品高清尤物| 欧美精品 国产精品| 色哟哟亚洲精品| 欧美日韩欧美一区二区| 在线欧美日韩精品| 99久久久国产精品| 在线免费观看成人短视频| 在线观看成人小视频| 337p亚洲精品色噜噜狠狠| 精品88久久久久88久久久| 亚洲国产电影在线观看| 一区二区三区欧美| 蜜桃91丨九色丨蝌蚪91桃色| 国产aⅴ综合色| 91亚洲精品久久久蜜桃| 欧美日韩在线免费视频| 精品国产免费人成电影在线观看四季 | 91精品欧美久久久久久动漫| 日韩精品一区二区三区蜜臀 | 日本伊人色综合网| 九九九精品视频| 韩国女主播成人在线| 国产**成人网毛片九色 | 欧美极品aⅴ影院| 亚洲尤物在线视频观看| 久久精品国产99国产| av电影在线观看完整版一区二区| 欧美在线免费视屏| 欧美成人精品3d动漫h| 久久一夜天堂av一区二区三区| 亚洲另类在线一区| 国产激情视频一区二区在线观看 | 久久久国际精品| 同产精品九九九| 91网页版在线| 国产午夜亚洲精品午夜鲁丝片| 婷婷成人激情在线网| 一本一道波多野结衣一区二区| av一本久道久久综合久久鬼色| 国产91精品久久久久久久网曝门| 日韩一区二区中文字幕| 亚洲一级不卡视频| jlzzjlzz国产精品久久| 久久色在线观看| 男女视频一区二区| 国内精品久久久久影院色| 欧美日韩色一区| 亚洲伦理在线精品| 东方欧美亚洲色图在线| 久久久久成人黄色影片| 激情深爱一区二区| 日韩视频一区二区在线观看| 亚洲bt欧美bt精品777| 色偷偷88欧美精品久久久| 中文字幕 久热精品 视频在线 | 日韩写真欧美这视频| 亚洲成年人网站在线观看| 91美女福利视频| 亚洲视频一区在线| 99re这里只有精品首页| 国产精品乱人伦| 岛国一区二区在线观看| 在线免费视频一区二区| 一区二区三区影院| 色就色 综合激情| 亚洲麻豆国产自偷在线| 91性感美女视频| 亚洲日本青草视频在线怡红院 | 中文字幕第一区第二区| 国产成人av一区| 日本一区二区三区在线不卡| 一区二区三区丝袜| 色狠狠av一区二区三区| 亚洲综合久久av| 欧美午夜视频网站| 天天综合色天天| 7777精品伊人久久久大香线蕉完整版 | 亚洲一级二级三级| 国产欧美精品一区aⅴ影院 | 一卡二卡三卡日韩欧美| 91丨九色丨黑人外教| 中文在线一区二区| 99综合影院在线| 亚洲精品高清视频在线观看| 91久久人澡人人添人人爽欧美| 亚洲黄色免费网站| 九九**精品视频免费播放| 欧美精品一区二区三区很污很色的 | 日本中文字幕一区二区有限公司| 欧美变态凌虐bdsm| 丁香另类激情小说| 一区二区三区日韩在线观看| 欧美福利一区二区| 亚洲欧洲av在线| 欧美亚洲禁片免费| 蜜臀av在线播放一区二区三区| www国产精品av| 99精品欧美一区二区三区小说| 亚洲男女毛片无遮挡| 欧美巨大另类极品videosbest| 另类人妖一区二区av| 国产精品亲子乱子伦xxxx裸| 欧美在线色视频| 精品中文字幕一区二区小辣椒| 国产欧美日本一区视频| 免费一级片91| 国产视频亚洲色图| 日本高清视频一区二区| 日本午夜精品视频在线观看| 久久影院电视剧免费观看| 一本大道av伊人久久综合| 日韩精品免费专区| 久久久国产一区二区三区四区小说| 91视频你懂的| 麻豆一区二区99久久久久| 国产精品午夜春色av| 欧美精品电影在线播放| 国产 欧美在线| 日韩高清中文字幕一区| 色偷偷88欧美精品久久久| 久草热8精品视频在线观看| 亚洲免费毛片网站| 精品少妇一区二区三区日产乱码| 99久久婷婷国产综合精品电影 | 日韩精品一区第一页| 欧美刺激午夜性久久久久久久 | 中文字幕在线不卡一区二区三区| 欧美丰满美乳xxx高潮www| 成人久久18免费网站麻豆 | 欧美日韩一区二区三区四区五区| 免费在线观看日韩欧美| 亚洲欧美国产毛片在线| 欧美电视剧免费全集观看| 91视频你懂的| 国产高清久久久| 日本中文字幕一区二区视频 | 色8久久精品久久久久久蜜| 麻豆精品一区二区三区| 国产精品久久久久久久裸模| 日韩一区二区三区视频在线| 色诱亚洲精品久久久久久| 国产精品自拍一区| 日韩主播视频在线| 中文字幕在线观看一区| 久久免费电影网| 日韩一区二区三区高清免费看看| 在线观看av不卡| 成人av在线一区二区| 国产一区在线不卡| 日韩av高清在线观看| 亚洲精品老司机| 国产精品护士白丝一区av| 久久婷婷国产综合国色天香| 欧美一区二区三区影视| 欧美性猛交xxxx乱大交退制版| 成人性生交大合| 国产福利不卡视频| 日本不卡一区二区三区高清视频| 亚洲青青青在线视频| 国产精品美女久久久久久久| 精品第一国产综合精品aⅴ| 日韩一区二区三区精品视频| 欧美日韩国产精选| 日本亚洲最大的色成网站www| 一区二区三区精密机械公司| 亚洲欧洲精品成人久久奇米网| 久久久久久久久久久久久夜| 精品国产免费人成在线观看| 欧美一级精品大片| 日韩一级免费一区| 91精品国产一区二区三区香蕉 | 日本亚洲三级在线| 香蕉av福利精品导航| 亚洲国产综合91精品麻豆| 日韩亚洲电影在线| 日韩精品一区在线| 日韩欧美视频一区| 欧美一级高清大全免费观看| 欧美日韩情趣电影| 欧美日韩国产影片| 欧美日韩国产一级片| 欧美视频一区在线观看| 精品视频1区2区| 欧美日韩高清一区二区三区| 69久久99精品久久久久婷婷| 欧美一区二区三区四区久久| 91精品国产综合久久精品图片| 3d动漫精品啪啪一区二区竹菊| 日韩一级在线观看| 91免费视频大全| 在线日韩国产精品| 制服丝袜av成人在线看| 91精品国产综合久久久蜜臀粉嫩 |