|
|||||||||||
| 技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe |
microblaze的中斷 |
| 作者:coyoo 欄目:EDA技術(shù) |
外部中斷調(diào)試,程序執(zhí)行到microblaze_enable_interrupt()就停止了,不知道什么原因?! 下面是我的主函數(shù): /******************************************************************** * File NAME: main.c * Version: 1.0 * Date: 10/19/2003 * MODEL: Insight_MB_OPB_INTC * * Company: XILINX.html">XILINX * * Disclaimer: THESE DESIGNS ARE PROVIDED "AS IS" WITH NO WARRANTY * WHATSOEVER AND XILINX SPECIFICALLY DISCLAIMS ANY * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR * A PARTICULAR PURPOSE, OR AGAINST INFRINGEMENT. * * COPYRIGHT (c) 2001 XILINX.html">XILINX, Inc. * All rights reserved **********************************************************************/ /******************************************************************** * This program uses the timer and gpio to demonstrate interrupt HANDLING. * The timer is set to interrupt regularly. The frequency is set in the code. * Every time there is an interrupt from the timer, * a rotating DISPLAY of leds on the board is updated. * * The LEDs and switches are in these bit positions: * LSB 0: gpio_io<3> * LSB 1: gpio_io<2> * LSB 2: gpio_io<1> * LSB 3: gpio_io<0> **********************************************************************/ /* This is the list of files that must be included to access the peripherals: * xtmrctr.h - to access the timer * xintc_l.h - access interrupt controller. * xparameters.h - General purpose definitions. Must always be included * when any drivers/print routines are accessed. This defines * addresses of all peripherals, declares the interrupt service * routines, etc. */ //#include "xtmrctr_l.h" //#include "xintc_l.h" #include "xparameters.h" #include "xgpio.h" //#include "xuartlite_l.h" // The following array are hex values that are used to write decimal values 0-9 to the 7-segment // DISPLAYs. static CHAR DISPLAY_data[10] ={0x01,0x4f,0x12,0x06,0x4c,0x24,0x20,0x0f,0x00,0x04}; void ext_int_handler(void){xil_printf("Enter External Interrupt\r\n");} int main() { Xuint32 i; xil_printf("Running Main\r\n"); xil_printf("Running TEST\r\n"); //XGpio_mSetDataDirection(XPAR_LED_7SEGMENT_BASEADDR,1, 0); //XGpio_mSetDataReg(XPAR_LED_7SEGMENT_BASEADDR,1, DISPLAY_data[6]); //for(i=0;i<10000000;i++); //ext_int_handler(); /* Enable MB interrupts */ microblaze_enable_interrupts(); xil_printf("Running TEST\r\n"); xil_printf("Wait for interrupts to occur\r\n"); //ext_int_handler(); //ext_int_handler(); /* Wait for interrupts to occur */ while (1) { xil_printf("Enter while function\r\n"); for(i=0;i<10000000;i++); } } |
| 2樓: | >>參與討論 |
| 作者: coyoo 于 2005/9/20 8:37:00 發(fā)布:
沒有人頂? |
|
| 3樓: | >>參與討論 |
| 作者: picklas 于 2005/9/25 10:16:00 發(fā)布:
re 你的中斷句柄呢?把你的中斷處理程序貼出來。 |
|
|
|
| 免費(fèi)注冊(cè)為維庫電子開發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 |
Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號(hào) |