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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? example_28xflash.c

?? TI公司的2812dsp所有程序
?? C
字號:
//
//      TMDX ALPHA RELEASE
//      Intended for product evaluation purposes
//
//###########################################################################
//
// FILE:	DSP28_28xFlash.c
//
// TITLE:	DSP28 Flash example.
//
// ASSUMPTIONS:
//
//          This program requires the DSP28 header files.  To compile the
//          program as is, it should reside in the DSP28/examples/flash 
//          sub-directory.
//
//          As supplied, this project is configured for "boot to Flash" operation.   
//
// DESCRIPTION:
//
//          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.   
// 
//          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
// =====|=============|======|===============================================
//  0.58| 28 Jun 2002 | L.H. | First Release
//###########################################################################

// Step 0.  Include required header files
         // DSP28_Device.h: device specific definitions #include statements for
         // all of the peripheral .h definition files.
         // DSP28_Example.h is specific for the given example.  

#include "DSP28_Device.h"

// 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");

// Information on the location of functions that are going
// to be relocated to RAM
#define RAM_FUNC_LOAD   0x3EC000    // Source location in Flash
#define RAM_FUNC_LENGTH 0x000080    // Number of 32-bit values to copy
#define RAM_FUNC_RUN    0x008000    // Destination location in RAM

// 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);

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

void main(void)
{
    Uint32 * pSourceAddr;
    Uint32 * pDestAddr;
    Uint16 i;

// Step 1. Initialize System Control registers, PLL, WatchDog, Clocks to default state:
    // This function is found in the DSP28_SysCtrl.c file.
	InitSysCtrl();

// Step 2. Select GPIO for the device or for the specific application:
    // This function is found in the DSP28_Gpio.c file.
	// InitGpio();  // Skip for this test

// Step 3. Initialize PIE vector table:
	// The PIE vector table is initialized with pointers to shell Interrupt 
    // Service Routines (ISR).  The shell routines are found in DSP28_DefaultIsr.c.
	// Insert user specific ISR code in the appropriate shell ISR routine in 
    // the DSP28_DefaultIsr.c file.

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

	// Initialize Pie Control Registers To Default State:
	// This function is found in the DSP28_PieCtrl.c file.
	InitPieCtrl();

	// Initialize the PIE Vector Table To a Known State:
    // This function is found in DSP28_PieVect.c.
	// This function populates the PIE vector table with pointers
    // to the shell ISR functions found in DSP28_DefaultIsr.c.
	InitPieVectTable();	
	
// Step 4. Initialize all the Device Peripherals to a known state:
	// This function is found in DSP28_InitPeripherals.c
    // InitPeripherals();
   
// Step 5. User specific functions, Reassign vectors (optional), Enable Interrupts:

    // Copy time critical code and Flash setup code to RAM
    // This includes the following ISR functions: EvaTimer1(), EvaTimer2()
    // EvbTimer3 and and InitFlash();

	pSourceAddr = (Uint32 *)RAM_FUNC_LOAD;
	pDestAddr = (Uint32 *)RAM_FUNC_RUN;
	for(i = 0; i < RAM_FUNC_LENGTH; i++)
	{
	    *pDestAddr++ = *pSourceAddr++;
	}
	
	// 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;
				
    // 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;



    // 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;



	// 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;	


	// 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;	


	// Reassign ISRs. 
        // Reassign the PIE vector for T1PINT, T2PINT, T3PTINT, 
        // and T4PINT to point to a different 
        // ISR then the shell routine found in DSP28_DefaultIsr.c.
        // This is done if the user does not want to use the shell ISR routine
        // but instead wants to use their own ISR.  This step is optional:
	
	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

    // 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++;
	}

} 	


// Step 7. Insert all local Interrupt Service Routines (ISRs) and functions here:	
	// If local ISRs are used, reassign vector addresses in vector table as
    // shown in Step 5


// 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 recieve 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 recieve 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.
//===========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区在线观看| 九九热在线视频观看这里只有精品| 国产精品一二二区| 国产日本一区二区| 成人精品gif动图一区| 亚洲欧美日韩中文播放| 欧美午夜寂寞影院| 捆绑调教美女网站视频一区| 久久久不卡影院| 99视频热这里只有精品免费| 亚洲国产视频a| 欧美videos中文字幕| 国产aⅴ综合色| 亚洲综合精品久久| 日韩美女天天操| 成人国产精品免费观看动漫| 亚洲精品免费在线观看| 欧美高清一级片在线| 国产高清不卡一区二区| 一区二区三区精品久久久| 日韩亚洲欧美综合| 99热国产精品| 日日夜夜精品视频免费 | 欧美撒尿777hd撒尿| 蜜臀av性久久久久av蜜臀妖精| 日本一区二区三级电影在线观看| 色呦呦国产精品| 久久超级碰视频| 亚洲丝袜自拍清纯另类| 3d成人h动漫网站入口| 国产制服丝袜一区| 亚洲午夜久久久久中文字幕久| 精品久久久网站| 欧美在线观看禁18| 国产精品原创巨作av| 亚洲h动漫在线| 国产欧美日韩精品a在线观看| 精品视频999| 成人网在线播放| 久久99在线观看| 亚洲一区二区三区四区五区黄| 精品国产91九色蝌蚪| 欧美视频一二三区| 成人国产精品免费观看视频| 经典三级一区二区| 亚洲成人av福利| 亚洲欧美在线视频观看| 久久久综合九色合综国产精品| 欧美三日本三级三级在线播放| 成人免费高清在线观看| 国内外精品视频| 日产欧产美韩系列久久99| 一区二区欧美视频| 国产精品超碰97尤物18| 国产精品网站导航| www国产成人免费观看视频 深夜成人网| 色av成人天堂桃色av| va亚洲va日韩不卡在线观看| 国产一区二区三区精品视频| 奇米影视一区二区三区小说| 亚洲在线中文字幕| 亚洲欧美日韩一区二区| 国产精品色在线观看| 国产日韩欧美麻豆| 久久久久亚洲综合| 精品欧美一区二区三区精品久久| 欧美一区二区高清| 欧美一区二区三区在线电影| 欧美久久久久久久久中文字幕| 91国在线观看| 在线欧美日韩精品| 欧美在线视频你懂得| 欧美性欧美巨大黑白大战| 91久久久免费一区二区| 色综合久久综合中文综合网| 色综合天天综合| 色综合一区二区| 色综合久久精品| 91亚洲精品一区二区乱码| 色综合中文字幕国产 | 国产在线播放一区| 老司机一区二区| 国产乱码精品1区2区3区| 国产91综合网| 成人精品gif动图一区| 99久久久久久| 欧美在线播放高清精品| 欧美日韩亚洲综合在线 | 在线观看亚洲a| 欧美三级电影精品| 日韩午夜在线播放| 久久五月婷婷丁香社区| 国产日产欧美一区| 亚洲人被黑人高潮完整版| 亚洲国产精品麻豆| 久久精品99国产精品日本| 国产91丝袜在线播放九色| 99视频超级精品| 精品视频123区在线观看| 欧美mv日韩mv国产| 日韩美女久久久| 午夜久久电影网| 国产一区二区三区在线观看精品| 成人免费高清在线| 欧美制服丝袜第一页| 欧美成人vps| 亚洲欧洲av一区二区三区久久| 亚洲成人av一区二区三区| 九九精品视频在线看| av电影天堂一区二区在线| 欧美在线观看一二区| 精品欧美黑人一区二区三区| 中文字幕av免费专区久久| 亚洲电影欧美电影有声小说| 国产精品影视网| 欧美网站大全在线观看| 久久综合久久鬼色| 亚洲免费三区一区二区| 麻豆成人免费电影| 97se亚洲国产综合自在线| 日韩三级精品电影久久久| 国产精品国产精品国产专区不片| 亚洲香肠在线观看| 东方aⅴ免费观看久久av| 欧美三级电影一区| 国产精品久久久久久久久免费樱桃 | 首页国产欧美日韩丝袜| 福利一区福利二区| 91麻豆精品国产91久久久久久久久 | 国产在线播放一区三区四| 欧美优质美女网站| 国产日产亚洲精品系列| 日韩精品成人一区二区在线| eeuss影院一区二区三区 | 97se亚洲国产综合自在线观| 日韩欧美成人午夜| 亚洲成人免费视频| 99久久精品情趣| 国产色产综合色产在线视频 | 夜夜嗨av一区二区三区网页| 久久精品72免费观看| 欧美系列在线观看| 亚洲三级免费观看| 粉嫩一区二区三区在线看| 精品久久久久久最新网址| 天天综合色天天综合色h| 91美女片黄在线观看91美女| 国产日韩精品一区| 国产综合色在线| 91精品国产欧美一区二区| 亚洲成人精品一区| 欧美在线一区二区三区| 亚洲免费电影在线| 91香蕉视频mp4| 国产精品麻豆欧美日韩ww| 国产91在线观看丝袜| 久久久av毛片精品| 国产一区啦啦啦在线观看| 精品国产乱码久久久久久老虎 | 91福利在线播放| 国产精品成人在线观看| a美女胸又www黄视频久久| 国产精品久久夜| 成人短视频下载| 国产精品福利电影一区二区三区四区| 国产传媒久久文化传媒| 国产亚洲欧洲一区高清在线观看| 韩国精品免费视频| 久久久三级国产网站| 国产凹凸在线观看一区二区| 欧美极品少妇xxxxⅹ高跟鞋| 成人综合婷婷国产精品久久免费| 国产亲近乱来精品视频| 不卡av电影在线播放| 亚洲女性喷水在线观看一区| 色伊人久久综合中文字幕| 亚洲激情欧美激情| 欧美日韩三级一区二区| 奇米亚洲午夜久久精品| 日韩欧美成人激情| 夫妻av一区二区| 自拍偷拍亚洲欧美日韩| 欧洲精品一区二区三区在线观看| 亚洲国产日韩av| 欧美不卡一区二区三区| 成人精品视频一区二区三区| 1024精品合集| 在线不卡免费欧美| 国产麻豆成人精品| 日韩美女视频一区| 51午夜精品国产| 国产不卡视频一区| 一区二区理论电影在线观看| 欧美一卡在线观看| 成人性生交大片免费| 性做久久久久久| 久久久久国产精品麻豆ai换脸| 99国产麻豆精品| 美国十次了思思久久精品导航| 中文字幕乱码久久午夜不卡|