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

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

?? example_28xevtimerperiod.c

?? TMS320C2812的C語言全套例程
?? 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.
//===========================================================================

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区在线播放 | 国产精品丝袜在线| 国产麻豆成人精品| 亚洲视频一区在线| 精品久久久久久久久久久久包黑料 | 欧美挠脚心视频网站| 五月激情综合网| 欧美岛国在线观看| 99精品欧美一区| 国产激情一区二区三区四区 | 91精品国产综合久久精品性色| 成人免费高清视频| 精久久久久久久久久久| 亚洲激情综合网| 国产精品理论在线观看| 日韩你懂的在线观看| 欧美日韩精品一二三区| 91免费视频网| 婷婷综合五月天| 亚洲日本护士毛茸茸| 国产精品污www在线观看| 2022国产精品视频| 国产成人av电影在线播放| 精品在线免费观看| 国产精品美女www爽爽爽| 欧美精品一区二区在线播放| 欧美性感一区二区三区| 欧美日韩免费在线视频| 欧美无乱码久久久免费午夜一区| 国产成人精品午夜视频免费| 黄一区二区三区| 日韩专区欧美专区| 日日夜夜免费精品视频| 国产精品美日韩| 欧美肥妇bbw| 欧美在线看片a免费观看| 色婷婷久久久亚洲一区二区三区| 99精品久久免费看蜜臀剧情介绍| 国产精品正在播放| 国产成人久久精品77777最新版本| 日本成人中文字幕| 天堂成人国产精品一区| 免费久久99精品国产| 日本不卡视频一二三区| 国内精品视频一区二区三区八戒| 久久国产成人午夜av影院| 免费在线观看成人| 国产91清纯白嫩初高中在线观看| 国产中文字幕一区| 国产成人精品免费一区二区| 成人性生交大合| 亚洲天堂av老司机| 亚洲香肠在线观看| 日韩国产精品91| 国产很黄免费观看久久| 成人精品视频网站| 91福利在线播放| 欧美一卡二卡三卡| 欧美激情在线观看视频免费| 国产精品沙发午睡系列990531| 18成人在线观看| 日韩av不卡在线观看| 国内欧美视频一区二区| 午夜伦理一区二区| 韩国欧美国产1区| 色综合久久88色综合天天| 欧美日本一区二区在线观看| 欧美一区二区福利在线| 中文一区二区在线观看 | 欧美老肥妇做.爰bbww视频| 欧美一区二区三区四区久久| 国产视频一区二区三区在线观看| 亚洲一区在线视频观看| 国产女主播视频一区二区| 亚洲激情欧美激情| 国内成+人亚洲+欧美+综合在线| 91免费在线视频观看| 欧美在线观看禁18| 国产亚洲欧美色| 五月婷婷久久丁香| 97超碰欧美中文字幕| 欧美一区二区在线看| 国产精品区一区二区三区| 午夜精品福利在线| 99国产精品久久久久久久久久| 日韩av电影天堂| 欧美亚洲国产怡红院影院| 精品成人免费观看| 亚洲一区成人在线| 裸体在线国模精品偷拍| 春色校园综合激情亚洲| 精品久久久久久久久久久久久久久| 亚洲精品成a人| 99久久精品国产观看| 久久日韩精品一区二区五区| 亚洲国产aⅴ天堂久久| 久久精品国产精品亚洲红杏| 色狠狠av一区二区三区| 国产精品情趣视频| 国产精品资源在线看| 欧美乱妇15p| 五月婷婷久久丁香| 欧美精品日韩精品| 国产精品天美传媒| 欧美aⅴ一区二区三区视频| 一本色道a无线码一区v| 久久久99精品久久| 久久精品国产99| 欧美久久久久久久久久| 国产精品无遮挡| 97超碰欧美中文字幕| 亚洲欧美日韩精品久久久久| 色哟哟国产精品免费观看| 国产片一区二区| 激情小说欧美图片| 2023国产精华国产精品| 老鸭窝一区二区久久精品| 欧美日韩国产系列| 一区二区视频在线看| 成人在线一区二区三区| 亚洲chinese男男1069| 国产日韩欧美综合在线| 麻豆国产精品官网| 精品国产91亚洲一区二区三区婷婷| 欧美一区二区国产| 亚洲综合激情另类小说区| 在线观看国产91| 亚洲成人一区在线| 日韩久久久精品| 成人免费视频一区二区| 尤物av一区二区| 欧美精三区欧美精三区| 韩国一区二区三区| 国产亚洲一区二区三区四区| 国产69精品久久久久777| 日韩毛片在线免费观看| 欧美性受xxxx| 亚洲国产精品成人久久综合一区| 色婷婷狠狠综合| 婷婷六月综合亚洲| 日本一区免费视频| va亚洲va日韩不卡在线观看| 亚洲无人区一区| 久久先锋影音av鲁色资源| 91在线视频免费观看| 三级久久三级久久| 国产精品丝袜久久久久久app| 成人精品国产免费网站| 激情综合亚洲精品| 久久 天天综合| 精品制服美女久久| 激情综合网最新| 激情五月激情综合网| 国内精品在线播放| 国产成人精品三级麻豆| 懂色av噜噜一区二区三区av| 国产精品1区2区| 国产成人综合精品三级| 国产成人高清在线| 国产另类ts人妖一区二区| 国产精品77777| 丁香一区二区三区| 99精品国产99久久久久久白柏| 白白色 亚洲乱淫| 日本电影亚洲天堂一区| 欧美日韩中文另类| 日韩一区二区三区免费看| 欧美大片国产精品| 国产日产欧美一区二区视频| 国产欧美一区二区三区沐欲| 亚洲国产精品ⅴa在线观看| 国产精品久线在线观看| 亚洲男人的天堂在线aⅴ视频| 亚洲在线视频免费观看| 日本不卡不码高清免费观看| 国产精品88888| 色综合一区二区| 欧美一区国产二区| 中文字幕在线观看一区| 亚洲午夜精品在线| 狠狠狠色丁香婷婷综合久久五月| 麻豆视频观看网址久久| 国产成人免费视| 欧美男人的天堂一二区| 久久新电视剧免费观看| 亚洲一区二区在线观看视频| 精品亚洲成a人在线观看| 99国产精品99久久久久久| 欧美精品一二三| 国产精品女同一区二区三区| 天天操天天综合网| 国产一本一道久久香蕉| 日本二三区不卡| 久久久99精品免费观看不卡| 亚洲综合成人在线视频| 国产乱妇无码大片在线观看| 色嗨嗨av一区二区三区| 国产欧美一区二区精品忘忧草 | 欧美精品99久久久**| 久久精品视频在线看|