Specifications

334 www.xilinx.com Embedded System Tools Guide (EDK 6.2i)
1-800-255-7778 UG111 (v1.4) January 30, 2004
Chapter 23: Interrupt Management
R
ASK and XPAR_INTC_INSTANCE_NAME_INTERRUPT_SIGNAL_INTR. This
can be used to enable or disable interrupts.
2. The interrupt handler functions for each interruptible peripheral must be written.
3. Each handler function is then designated to be the handler for an interrupt signal
using the INT_HANDLER keyword in the MSS file. Alternately, the routines can be
registered with the exception table in the user code. For this example, we showcase
both these usecases by setting the routine for timer in the MSS file and setting up the
uart interrupt port handler in the user code. Note that intc interrupt signal must not be
given an INT_HANDLER keyword. If the INT_HANDLER keyword is not present for
a particular peripheral, a default dummy interrupt handler is used.
4. Libgen and mb-gcc is run to achieve the following:
i The XIntc_DeviceInterruptHandler function is registered as the main interrupt
handler with the MicroBlaze exception table by libgen. By default, MicroBlaze
turns off interrupts from the time an interrupt is recognized until the
corresponding rtid instruction is executed.
i An interrupt vector table is generated and compiled automatically by libgen. Each
of the peripherals connected to intc can also registers its interrupt handlers with
the intc interrupt handler.
i XIntc_DevicenterruptHandler calls the peripheral interrupt handler using the
updated interrupt vector table to identify the handler in order of priority.
i On interrupts, MicroBlaze jumps to XIntc_DeviceInterruptHandler using the
exception table when an interrupt occurs.
Example MHS File Snippet
BEGIN opb_timer
parameter INSTANCE = mytimer
parameter HW_VER = 1.00.b
parameter C_BASEADDR = 0xFFFF0000
parameter C_HIGHADDR = 0xFFFF00ff
bus_interface SOPB = opb_bus
port Interrupt = timer1
port CaptureTrig0 = net_gnd
END
EGIN opb_uartlite
parameter INSTANCE = myuart
parameter HW_VER = 1.00.b
parameter C_BASEADDR = 0xFFFF8000
parameter C_HIGHADDR = 0xFFFF80FF
parameter C_DATA_BITS = 8
parameter C_CLK_FREQ = 30000000
parameter C_BAUDRATE = 19200
parameter C_USE_PARITY = 0
bus_interface SOPB = opb_bus
port RX = rx
port TX = tx
port Interrupt = uart1
END
BEGIN opb_intc
parameter INSTANCE = myintc
parameter HW_VER = 1.00.b
parameter C_BASEADDR = 0xFFFF1000