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

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

?? example_281xswprioritizedinterrupts.c

?? 這是一個DSP開發(fā)的程序集,包含多個例子,對初學(xué)者很有幫助
?? C
?? 第 1 頁 / 共 2 頁
字號:
//###########################################################################
//
// FILE:   Example_281xSWPrioritizedInterrupts.c
//
// TITLE:  DSP281x Software Prioritized Interrupt Example.
//
// ASSUMPTIONS:
//
//          This program requires the DSP281x V1.00 header files.  
//          As supplied, this project is configured for "boot to H0" operation. 
//
//          Other then boot mode pin configuration, no other hardware configuration
//          is required.
//  
//
// DESCRIPTION:
//
//          For most applications, the hardware prioritization of the 
//          the PIE module is sufficient.  For applications that need custom
//          prioritization, this example illustrates an example of
//          how this can be done through software. 
//
//          For more information on F2810/12 interrupt priorities, refer to the
//          ReadMe_Example_28xISRPriorities.pdf file included with this example.
//
//          This program simulates interrupt conflicts by writing to the
//          PIEIFR registers.  This will simulate multiple interrupts coming into
//          the PIE block at the same time. 
//
//          The interrupt service routine routines are software prioritized
//          by the table found in the DSP281x_SWPrioritizedIsrLevels.h file.
//
//          1) Before compiling you must set the Global and Group interrupt priorities
//             in the DSP281x_SWPrioritizedIsrLevels.h file.
//
//          2) Compile the code, load, and run
//
//          3) At the end of each test there is a hard coded breakpoint (ESTOP0).  When code
//             stops at the breakpoint, examine the ISRTrace buffer to see the order
//             in which the ISR's completed.    All PIE interrupts will add to the
//             ISRTrace.
//
//             The ISRTrace will consist of a list of hex values as shown:
//
//                                  0x00wx    <- PIE Group w interrup x finished first
//                                  0x00yz    <- PIE Group y interrupt z finished next
//
//          4) If desired, set a new set of Global and Group interrupt priorites
//             and repeat the test to see the change.
//          
//
//          Watch Variables:
//                ISRTrace[50]           Trace of ISR's in the order they complete
//                                       After each test, examine this buffer
//                                       to determine if the ISR's completed in
//                                       the order desired. 
//
//###########################################################################
//
//  Ver | dd mmm yyyy | Who  | Description of changes
// =====|=============|======|===============================================
//  1.00| 11 Sep 2003 | L.H. | Changes since previous version (v.58 Alpha)
//      |             |      | Corrected a number of comments.  Re-structured
//      |             |      | the flow of each testcase to make more sense.
//###########################################################################

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

// Define which interrupts are used in the PIE for each group.
#define ISRS_GROUP1  (M_INT1|M_INT2|M_INT4|M_INT5|M_INT6|M_INT7|M_INT8)
#define ISRS_GROUP2  (M_INT1|M_INT2|M_INT3|M_INT4|M_INT5|M_INT6|M_INT7)
#define ISRS_GROUP3  (M_INT1|M_INT2|M_INT3|M_INT4|M_INT5|M_INT6|M_INT7)
#define ISRS_GROUP4  (M_INT1|M_INT2|M_INT3|M_INT4|M_INT5|M_INT6|M_INT7)
#define ISRS_GROUP5  (M_INT1|M_INT2|M_INT3|M_INT4|M_INT5|M_INT6|M_INT7)
#define ISRS_GROUP6  (M_INT1|M_INT2|M_INT5|M_INT6)
#define ISRS_GROUP9  (M_INT1|M_INT2|M_INT3|M_INT4|M_INT5)


// This array will be used as a trace to check the order that the
// interrupts were serviced
Uint16  ISRTrace[50];
Uint16  ISRTraceIndex;  // used to update an element in the trace buffer

void main(void)
{
   Uint16 i;

// 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();
   
// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP281x_InitPeripherals.c
// InitPeripherals(); // Not required for this example
 
// Step 5. User specific code, enable interrupts:

// CASE 1:
//     Force all group 1 interrupts at once by writing to the PIEIFR1 register

       // Prepare for the test:
	   // Disable interrupts 
	   // Clear the trace buffer, PIE Control Register, CPU IER and IFR registers
	   DINT;
	   for(i = 0; i < 50; i++) ISRTrace[i] = 0;
	   ISRTraceIndex = 0;
       InitPieCtrl();
       IER = 0;
       IFR &= 0;
       
       // Enable the PIE block
       PieCtrlRegs.PIECRTL.bit.ENPIE = 1;   

       // Enable PIE group 1 interrupt 1-8
       PieCtrlRegs.PIEIER1.all = 0x00FF;

       // Make sure PIEACK for group 1 is clear (default after reset)
       PieCtrlRegs.PIEACK.all = M_INT1;
	
       // Enable CPU INT1
       IER |= M_INT1;

       // Force all valid interrupts for Group 1
       PieCtrlRegs.PIEIFR1.all = ISRS_GROUP1;
       
       // Enable global Interrupts CPU level:
	   EINT;   // Enable Global interrupt INTM
	   
	   // Wait for all Group 1 interrupts to be serviced
	   while(PieCtrlRegs.PIEIFR1.all != 0x0000 ){}
	   
       // Stop here and check the ISRTrace to determine which order the 
       // ISR Routines completed.  The order is dependant on the priority
       // assigned in the DSP281x_SWPrioritizedIsrLevels.h file
       // 
       // The ISRTrace will contain a list of values corresponding to the
       // interrupts serviced in the order they were serviced. 
	   // For example if the ISRTrace looks like this
	   //        0x0014     ISR Group 1 interrupt 4
	   //        0x0017     ISR Group 1 interrupt 7
	   //        0x0016     ISR Group 1 interrupt 6
	   //        0x0000     end of trace
	   asm("        ESTOP0");	

// CASE 2:
//     Force all group 2 interrupts at once by writing to the PIEIFR2 register

       // Prepare for the test:
	   // Disable interrupts 
	   // Clear the trace buffer, PIE Control Register, CPU IER and IFR registers
	   DINT;
	   for(i = 0; i < 50; i++) ISRTrace[i] = 0;
	   ISRTraceIndex = 0;
       InitPieCtrl();
       IER = 0;
       IFR &= 0;

       // Enable the PIE block
       PieCtrlRegs.PIECRTL.bit.ENPIE = 1;   
       
       // Enable PIE group 2 interrupts 1-8 
       PieCtrlRegs.PIEIER2.all = 0x00FF;
       
       // Enable CPU INT2
       IER |= (M_INT2);

	   // Make sure PIEACK for group 2 is clear (default after reset)
       PieCtrlRegs.PIEACK.all = M_INT2;

       // Force all valid interrupts for Group 2
       PieCtrlRegs.PIEIFR2.all = ISRS_GROUP2;  

	   // Enable Global interrupts
	   EINT;

	   
	   // Wait for all group 2 interrupts to be serviced
	   while(PieCtrlRegs.PIEIFR2.all != 0x0000 ){}
	   
       // Stop here and check the order the ISR's were serviced in the
       // ISRTrace
	   asm("        ESTOP0");
	   
	   
// CASE 3:
//     Force all group 3 interrupts at once by writing to the PIEIFR3 register

       // Prepare for the test:
	   // Disable interrupts 
	   // Clear the trace buffer, PIE Control Register, CPU IER and IFR registers
	   DINT;
	   for(i = 0; i < 50; i++) ISRTrace[i] = 0;
	   ISRTraceIndex = 0;
       InitPieCtrl();
       IER = 0;
       IFR &= 0;

       // Enable the PIE block
       PieCtrlRegs.PIECRTL.bit.ENPIE = 1;   
              
       // Enable PIE group 3 interrupts 1-8 
       PieCtrlRegs.PIEIER3.all = 0x00FF;

	   // Make sure PIEACK for group 3 is clear (default after reset)
       PieCtrlRegs.PIEACK.all = M_INT3;

       // Enable CPU INT3
       IER |= (M_INT3);

       // Force all valid interrupts for Group 3
       PieCtrlRegs.PIEIFR3.all = ISRS_GROUP3;  

	   // Enable Global interrupts
	   EINT;
	   
	   // Wait for all group 3 interrupts to be serviced
	   while(PieCtrlRegs.PIEIFR3.all != 0x0000 ){}
	   
       // Stop here and check the order the ISR's were serviced in the
       // ISRTrace
	   asm("        ESTOP0");	   	   	   
	   
// CASE 4:
//     Force all group 4 interrupts at once by writing to the PIEIFR4 register

       // Prepare for the test:
	   // Disable interrupts 
	   // Clear the trace buffer, PIE Control Register, CPU IER and IFR registers
	   DINT;
	   for(i = 0; i < 50; i++) ISRTrace[i] = 0;
	   ISRTraceIndex = 0;
       InitPieCtrl();
       IER = 0;
       IFR &= 0;

       // Enable the PIE block
       PieCtrlRegs.PIECRTL.bit.ENPIE = 1;   
       
       // Enable PIE group 4 interrupts 1-8 
       PieCtrlRegs.PIEIER4.all = 0x00FF;

	   // Make sure PIEACK for group 3 is clear (default after reset)
       PieCtrlRegs.PIEACK.all = M_INT4;
       
       // Enable CPU INT4
       IER |= (M_INT4);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利国产成人精品照片| 美日韩黄色大片| 99国产精品视频免费观看| 国产视频一区不卡| 国产福利电影一区二区三区| 国产欧美1区2区3区| 国产成人免费av在线| 国产精品久久久久久久久搜平片| 成人av午夜影院| 亚洲乱码国产乱码精品精小说| 一本一道综合狠狠老| 亚洲国产精品久久久男人的天堂| 欧美日韩视频在线第一区| 日本亚洲一区二区| 久久久久久久国产精品影院| 99久久精品免费| 亚洲国产成人av网| 日韩一区中文字幕| 91在线视频播放地址| 偷拍一区二区三区四区| 精品国产凹凸成av人导航| 夫妻av一区二区| 一区二区三区四区在线免费观看| 56国语精品自产拍在线观看| 国产一区二区视频在线| 亚洲精品视频一区| 3atv一区二区三区| 不卡的av中国片| 香蕉影视欧美成人| 久久久www免费人成精品| 成人永久aaa| 琪琪久久久久日韩精品| 国产精品免费人成网站| 欧美日韩国产精品自在自线| 国产盗摄一区二区| 亚洲va欧美va人人爽午夜| 久久精品亚洲一区二区三区浴池| 日本高清免费不卡视频| 国产在线视频精品一区| 一区二区在线免费| 精品成人一区二区三区四区| 在线观看一区不卡| 国产伦精品一区二区三区免费迷 | 日韩国产欧美视频| 国产精品污www在线观看| 欧美片网站yy| 日韩欧美的一区| 91丨porny丨国产入口| 久久99国产精品免费| 亚洲一区二区三区四区五区黄 | 国产剧情在线观看一区二区| 亚洲男人天堂av| 久久久久久久久99精品| 91精品麻豆日日躁夜夜躁| 色综合天天综合网国产成人综合天| 久久99精品一区二区三区 | 天堂一区二区在线| 中文字幕欧美一区| 久久久久99精品一区| 日韩欧美亚洲国产精品字幕久久久| 色综合久久中文综合久久牛| 国产精品一区二区在线播放| 蜜桃视频第一区免费观看| 午夜精品福利在线| 亚洲精品视频在线| 亚洲男帅同性gay1069| 国产精品卡一卡二卡三| 久久精品亚洲乱码伦伦中文| 精品理论电影在线观看| 欧美一级搡bbbb搡bbbb| 欧美老肥妇做.爰bbww| 精品视频色一区| 欧美性大战久久久| 在线一区二区三区做爰视频网站| av高清久久久| 97精品电影院| 91日韩在线专区| 色综合久久中文综合久久97| proumb性欧美在线观看| 99久久精品免费精品国产| 99re6这里只有精品视频在线观看| 国产69精品久久99不卡| 欧美网站一区二区| 在线观看视频91| 欧美三级资源在线| 欧美日韩亚洲综合一区二区三区 | 懂色中文一区二区在线播放| 国产成人在线视频网址| 成人性生交大片免费| 成人av网站在线观看免费| av在线播放不卡| 99综合电影在线视频| 91成人在线免费观看| 欧美日韩国产高清一区二区三区| 69堂亚洲精品首页| 精品国产凹凸成av人网站| 国产视频一区不卡| 亚洲欧美另类综合偷拍| 亚洲国产毛片aaaaa无费看| 日韩经典中文字幕一区| 激情小说亚洲一区| 从欧美一区二区三区| 色综合一个色综合亚洲| 欧美在线视频不卡| 欧美一区二区三区四区五区 | 久久精品免费在线观看| 中日韩av电影| 亚洲一区二区欧美日韩| 理论电影国产精品| 懂色av中文字幕一区二区三区| 色综合欧美在线| 91精品国产综合久久久久久久久久 | 一区二区高清视频在线观看| 香蕉成人啪国产精品视频综合网| 久久99国产精品久久99 | 日韩精品欧美成人高清一区二区| 久久99精品网久久| 91麻豆国产在线观看| 日韩一区二区三区电影| 中文字幕一区av| 免费不卡在线视频| 99视频在线精品| 91精品久久久久久久久99蜜臂| 亚洲福利视频一区二区| 国产成人午夜精品5599| 欧美日韩免费不卡视频一区二区三区| 欧美不卡激情三级在线观看| 亚洲人吸女人奶水| 久久av资源网| 色视频成人在线观看免| 精品国产自在久精品国产| 亚洲免费在线看| 国产精品白丝jk黑袜喷水| 欧美三级一区二区| 中文字幕不卡三区| 另类小说综合欧美亚洲| 在线中文字幕不卡| 国产精品三级av在线播放| 免费高清视频精品| 欧美在线观看一区二区| 国产欧美视频一区二区三区| 亚洲va欧美va国产va天堂影院| 波多野结衣在线aⅴ中文字幕不卡| 欧美一级夜夜爽| 亚洲永久免费视频| 99久久夜色精品国产网站| 26uuuu精品一区二区| 日韩精品乱码av一区二区| 91麻豆文化传媒在线观看| 欧美激情综合在线| 黄页网站大全一区二区| 在线播放视频一区| 亚洲主播在线观看| 一本到三区不卡视频| 国产精品视频麻豆| 国产一区二区久久| 日韩免费成人网| 日韩精品免费视频人成| 欧美视频在线一区| 一区二区三区在线观看网站| 92国产精品观看| 18成人在线观看| 97久久久精品综合88久久| 中文字幕精品一区| 国产成人免费视频网站| 国产婷婷色一区二区三区| 国产精品一区在线| 久久精品欧美一区二区三区麻豆| 久久99国产精品免费网站| 欧美xxxxx牲另类人与| 久久99精品久久久久久| 欧美日韩精品一区二区| 国产夜色精品一区二区av| 日本中文字幕一区二区有限公司| 在线观看一区二区视频| 亚洲午夜日本在线观看| 欧美专区在线观看一区| 亚洲高清在线精品| 欧美视频中文一区二区三区在线观看 | 久久一日本道色综合| 麻豆91免费观看| 26uuu亚洲综合色| 国产一区二区影院| 国产精品久久看| 一本高清dvd不卡在线观看| 亚洲成a人片综合在线| 欧美精品久久久久久久多人混战| 日本午夜精品一区二区三区电影 | 久久99热99| 国产欧美一区二区精品性色超碰| 国产成人啪免费观看软件| 亚洲国产精品成人综合| 99国产麻豆精品| 天堂一区二区在线| 精品国产髙清在线看国产毛片| 国产成人在线免费| 一区二区成人在线视频| 日韩欧美中文字幕一区| 国产成人精品免费看| 一区二区三区欧美|