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

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

?? example_28xevtimerperiod.c

?? TMS320C2812全套例程.rar
?? C
字號:
//
//      TMDX ALPHA RELEASE
//      Intended for product evaluation purposes
//
//###########################################################################
//
// FILE:	DSP28_EvTimerPeriod.c
//
// TITLE:	DSP28 Event Manager GP Timer example program.
//
// ASSUMPTIONS:
//
//          This program requires the DSP28 header files.  To compile the
//          program as is, it should reside in the DSP28/examples/ev_timer_period 
//          sub-directory.
//
//          As supplied, this project is configured for "boot to H0" operation.  
//
// 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.
//
//          Watch Variables:
//
//                EvaTimer1InterruptCount;
//                EvaTimer2InterruptCount;
//                EvbTimer3InterruptCount;
//                EvbTimer4InterruptCount;
//
//###########################################################################
//
//  Ver | dd mmm yyyy | Who  | Description of changes
// =====|=============|======|===============================================
//  0.57| 06 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"


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

void main(void)
{

// 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:
	
	// Initialize count values to 0
	EvaTimer1InterruptCount = 0;
	EvaTimer2InterruptCount = 0;
	EvbTimer3InterruptCount = 0;
	EvbTimer4InterruptCount = 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:	
	for(;;);

} 	


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

interrupt void eva_timer1_isr(void)
{
	EvaTimer1InterruptCount++;

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

interrupt void eva_timer2_isr(void)
{
	EvaTimer2InterruptCount++;

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

interrupt void evb_timer3_isr(void)
{
	EvbTimer3InterruptCount++;
	
	// 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;

}

interrupt void evb_timer4_isr(void)
{
	EvbTimer4InterruptCount++;
	
	// 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一区二区三区免费野_久草精品视频
椎名由奈av一区二区三区| 国产一区二区在线免费观看| 日韩美女精品在线| 国产精品888| 狠狠色丁香久久婷婷综| 久久国产福利国产秒拍| 久草热8精品视频在线观看| 日本vs亚洲vs韩国一区三区二区| 一区二区国产视频| 亚洲国产综合在线| 午夜精品久久久久久| 午夜精品久久久久久久蜜桃app| 亚洲综合色噜噜狠狠| 亚洲线精品一区二区三区八戒| 亚洲高清久久久| 日韩精品1区2区3区| 看电影不卡的网站| 国产真实乱偷精品视频免| 国产一区91精品张津瑜| 国产成a人亚洲| 99精品热视频| 欧美无砖专区一中文字| 日韩片之四级片| 久久久综合九色合综国产精品| 日本一区二区三区dvd视频在线| 中文字幕av不卡| 亚洲黄色片在线观看| 日韩精品视频网站| 国产精品一区二区x88av| 成人动漫精品一区二区| 色婷婷av一区二区三区gif| 91.com在线观看| 久久久影视传媒| 亚洲美女在线一区| 另类综合日韩欧美亚洲| 成人福利视频在线| 欧美日韩一区国产| 26uuu国产日韩综合| 中文字幕日韩一区| 日日嗨av一区二区三区四区| 韩国一区二区三区| 亚洲bt欧美bt精品| 精品亚洲国产成人av制服丝袜 | 人人狠狠综合久久亚洲| 久久99久久99精品免视看婷婷 | 日韩午夜精品视频| 国产日韩欧美高清| 亚洲综合男人的天堂| 狠狠色丁香婷综合久久| 色悠悠久久综合| 精品国产1区二区| 一区二区三区在线影院| 久久国产精品一区二区| 国产农村妇女精品| 亚洲一级二级在线| 国内成人自拍视频| 欧美日韩日本视频| 国产三级久久久| 亚洲电影视频在线| 成人av小说网| 日韩精品一区二区三区在线观看| 亚洲视频中文字幕| 国产曰批免费观看久久久| 欧美视频一区二区在线观看| 中文字幕欧美区| 国产综合久久久久久鬼色| 在线免费av一区| 国产亚洲人成网站| 青青国产91久久久久久| 色婷婷av一区二区三区软件| 国产亚洲成aⅴ人片在线观看| 性做久久久久久免费观看| 国产91丝袜在线播放0| 欧美大片日本大片免费观看| 亚洲午夜久久久久久久久久久| 国产成人精品免费网站| 91精品福利在线一区二区三区| 亚洲日本中文字幕区| 国产aⅴ综合色| 精品处破学生在线二十三| 日韩avvvv在线播放| 色噜噜久久综合| 国产精品国产三级国产aⅴ原创| 美女网站在线免费欧美精品| 欧美日本国产视频| 一区二区在线观看免费视频播放| 国产aⅴ综合色| 国产亚洲一区二区三区| 国产精品自在欧美一区| 欧美成人一区二区三区在线观看 | 94色蜜桃网一区二区三区| 精品国产伦一区二区三区观看体验 | 欧美一区二区三区不卡| 亚洲 欧美综合在线网络| 欧美性生活久久| 一区二区三区加勒比av| 色综合久久天天综合网| 综合婷婷亚洲小说| 成人综合婷婷国产精品久久 | 亚洲图片欧美激情| a美女胸又www黄视频久久| 国产婷婷一区二区| 国产风韵犹存在线视精品| 2021中文字幕一区亚洲| 国产美女视频一区| 久久久精品国产免大香伊| 韩国视频一区二区| 久久精品男人天堂av| 国产成a人无v码亚洲福利| 国产精品视频第一区| 国产资源在线一区| 精品国产露脸精彩对白| 国产精品资源站在线| 国产校园另类小说区| 高清国产一区二区| 亚洲视频一区二区在线| 欧美日韩中文另类| 欧美羞羞免费网站| 天天亚洲美女在线视频| 91麻豆精品91久久久久久清纯| 欧美aⅴ一区二区三区视频| 欧美电影免费观看高清完整版在线观看 | 色婷婷精品久久二区二区蜜臀av| 亚洲欧美偷拍另类a∨色屁股| 色婷婷一区二区三区四区| 亚洲一区二区视频| 91精品国产免费| 国产精品综合二区| 日韩美女精品在线| 欧美日本在线观看| 黑人巨大精品欧美一区| 欧美精彩视频一区二区三区| 色综合久久九月婷婷色综合| 亚洲国产成人tv| 精品国产免费人成在线观看| fc2成人免费人成在线观看播放| 一区二区三区欧美亚洲| 日韩一级大片在线| 成人高清免费观看| 亚洲成人激情社区| 久久久99免费| 91行情网站电视在线观看高清版| 日韩精品久久理论片| 欧美精品一区二区蜜臀亚洲| 91蜜桃免费观看视频| 日韩在线观看一区二区| 国产欧美中文在线| 欧美艳星brazzers| 狠狠色狠狠色综合日日91app| 亚洲四区在线观看| 日韩一区二区三区av| av电影天堂一区二区在线| 丝袜国产日韩另类美女| 国产日韩精品一区二区浪潮av| 在线精品观看国产| 国内精品第一页| 亚洲福利一区二区三区| 中文字幕av一区二区三区| 在线播放亚洲一区| 91在线国内视频| 国内精品国产成人| 午夜不卡av在线| 国产精品国产三级国产普通话三级| 91麻豆精品国产无毒不卡在线观看| 福利一区在线观看| 蜜臀av一级做a爰片久久| 日韩美女精品在线| 久久婷婷成人综合色| 欧美色图在线观看| 不卡一区二区三区四区| 麻豆精品视频在线| 一区二区视频免费在线观看| 久久精品一区二区三区四区| 欧美日韩aaaaaa| 91蝌蚪porny| 国产激情一区二区三区四区 | 一本色道久久加勒比精品| 极品少妇xxxx精品少妇偷拍 | 欧美视频一区二区在线观看| 成人免费毛片高清视频| 韩国三级在线一区| 五月天丁香久久| 亚洲在线免费播放| 亚洲欧洲99久久| 久久久99精品久久| 日韩欧美国产1| 欧美一区二区三区免费| 欧美视频在线一区| 在线看日本不卡| 91美女福利视频| www.av精品| 成人h精品动漫一区二区三区| 精品一区二区在线看| 日本va欧美va精品| 日本系列欧美系列| 日韩精品乱码av一区二区| 亚洲bdsm女犯bdsm网站| 亚洲成av人在线观看| 亚洲电影一区二区| 午夜一区二区三区在线观看|