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

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

?? example_28xflash.c

?? TMS320C2812
?? C
字號(hào):
//
//      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.
//===========================================================================

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区在线| 国产午夜精品一区二区三区四区| 欧美久久久久久久久中文字幕| 3d动漫精品啪啪1区2区免费| 337p日本欧洲亚洲大胆精品| 亚洲欧洲一区二区三区| 调教+趴+乳夹+国产+精品| 九九热在线视频观看这里只有精品| 国产**成人网毛片九色| 在线观看av一区| 欧美成va人片在线观看| 亚洲欧洲综合另类在线 | 色综合亚洲欧洲| 91精品国产综合久久久久久漫画| 国产日韩欧美一区二区三区乱码| 亚洲午夜久久久| 国产精品911| 欧美日韩免费电影| 亚洲国产成人在线| 热久久一区二区| 91免费看视频| 2022国产精品视频| 香蕉久久夜色精品国产使用方法 | 国产亚洲欧美在线| 亚洲一区视频在线观看视频| 国产高清无密码一区二区三区| 欧美中文字幕不卡| 国产精品视频看| 麻豆一区二区三区| 欧美午夜理伦三级在线观看| 日本一区二区三区高清不卡| 免费高清在线一区| 在线观看不卡视频| 中文字幕一区不卡| 国产在线精品一区二区三区不卡| 欧美日韩视频一区二区| 国产精品女人毛片| 精品一区二区影视| 欧美日韩国产一级片| 亚洲色图.com| 国产高清不卡一区二区| 欧美一卡2卡三卡4卡5免费| 亚洲精品国产第一综合99久久| 国产成人精品亚洲日本在线桃色| 日韩午夜在线播放| 亚州成人在线电影| 欧美影院一区二区| 亚洲欧洲日产国产综合网| 国产精品亚洲一区二区三区在线| 日韩午夜激情免费电影| 亚洲国产wwwccc36天堂| 91精品福利视频| 中文字幕亚洲成人| 成人av网站免费| 久久久精品国产免大香伊| 久久精品噜噜噜成人88aⅴ| 欧美日韩中文国产| 亚洲女同一区二区| 91麻豆精品秘密| ㊣最新国产の精品bt伙计久久| 久久99国产精品麻豆| 欧美成人三级电影在线| 美国av一区二区| 精品久久久久久久人人人人传媒| 麻豆精品在线播放| 欧美一级日韩一级| 琪琪一区二区三区| 日韩视频一区在线观看| 美女视频一区在线观看| 精品国产一二三区| 狠狠色狠狠色综合日日91app| 精品福利二区三区| 国模少妇一区二区三区| 国产三级精品视频| 成人av片在线观看| 亚洲视频精选在线| 欧美综合亚洲图片综合区| 亚洲一线二线三线久久久| 欧美在线色视频| 亚洲国产日韩精品| 欧美一区二区三区性视频| 日本成人在线网站| 久久一区二区三区国产精品| 国产黑丝在线一区二区三区| 国产精品毛片大码女人| 91麻豆蜜桃一区二区三区| 一区二区理论电影在线观看| 欧美日韩中文字幕一区| 日本免费新一区视频| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品一品二品| 中文字幕一区二区三区在线播放| 一本到不卡免费一区二区| 亚洲一区二区av电影| 制服丝袜亚洲精品中文字幕| 九色综合国产一区二区三区| 国产精品免费丝袜| 在线欧美日韩国产| 青青草一区二区三区| 国产亚洲精品7777| 色播五月激情综合网| 日韩国产精品大片| 国产视频一区不卡| 欧美在线一二三四区| 久久99这里只有精品| 国产精品久久一级| 欧美日韩中文字幕一区二区| 国产原创一区二区| 亚洲精品视频免费看| 91精品国产综合久久久久久漫画| 国产高清视频一区| 亚洲尤物视频在线| 久久久美女艺术照精彩视频福利播放| 91网站黄www| 久久99国产精品免费| 亚洲免费在线播放| 欧美大片拔萝卜| 99久久亚洲一区二区三区青草| 性做久久久久久免费观看欧美| 久久精品视频免费观看| 欧美日韩激情一区二区| 丁香婷婷综合色啪| 免费成人在线视频观看| 日韩理论片在线| 精品久久人人做人人爽| 91久久精品国产91性色tv | 欧美高清在线精品一区| 在线观看免费亚洲| 国产精品亚洲一区二区三区在线| 亚洲国产精品视频| 国产精品天美传媒| 日韩免费高清av| 欧美一a一片一级一片| 国产精品1区二区.| 免费久久精品视频| 樱花影视一区二区| 中文字幕巨乱亚洲| 日韩欧美你懂的| 欧美在线免费观看亚洲| 丰满放荡岳乱妇91ww| 另类的小说在线视频另类成人小视频在线 | 性做久久久久久免费观看| 国产精品久久久一区麻豆最新章节| 欧美精品三级在线观看| www.日韩av| 国产精品原创巨作av| 五月天久久比比资源色| 亚洲激情在线播放| 国产精品国模大尺度视频| 久久久精品黄色| 欧美变态凌虐bdsm| 欧美一区日韩一区| 欧美另类变人与禽xxxxx| 日本韩国欧美三级| 成人免费毛片a| 国产成人综合在线观看| 久久99精品国产麻豆婷婷洗澡| 午夜精品久久久久久久| 亚洲一二三四区| 一区二区三区欧美日韩| 国产精品久久久久久久久久免费看| 精品电影一区二区三区| 日韩精品一区二区三区中文不卡| 欧美男生操女生| 欧美日韩一二区| 欧美在线短视频| 91福利在线免费观看| 91美女福利视频| 91免费国产在线观看| 91麻豆国产福利精品| 95精品视频在线| 91麻豆福利精品推荐| 91欧美一区二区| 91黄色免费观看| 欧美性感一类影片在线播放| 欧美在线一二三| 欧美三级中文字幕在线观看| 欧洲生活片亚洲生活在线观看| 色天使久久综合网天天| 色综合久久六月婷婷中文字幕| 91影院在线观看| 欧美在线看片a免费观看| 欧美日韩一级二级三级| 欧美浪妇xxxx高跟鞋交| 欧美老女人在线| 日韩欧美国产一二三区| 精品国产伦理网| 欧美不卡一区二区三区四区| 欧美精品一区二区蜜臀亚洲| 久久伊99综合婷婷久久伊| 国产欧美日产一区| 国产精品久久毛片av大全日韩| 亚洲三级免费观看| 亚洲国产一区二区在线播放| 天堂一区二区在线| 极品少妇xxxx精品少妇| 国产福利不卡视频| aaa欧美大片| 欧美视频第二页| 日韩一区二区精品葵司在线|