![NXP Semiconductors MSC8113 Reference Manual Download Page 565](http://html1.mh-extra.com/html/nxp-semiconductors/msc8113/msc8113_reference-manual_1721628565.webp)
Interrupt Programming Examples
MSC8113 Reference Manual, Rev. 0
Freescale Semiconductor
17-21
17.2 Interrupt Programming Examples
This section describes how to use the LIC and the PIC programming model for
IRQ
and
NMI
signals. The programming examples include the following functionality:
Setting the interrupt base address in the VBA Register
Initializing the stack pointer
Masking interrupts in the MSC8113 status register
Masking, unmasking and programming PIC IR properties in the ELIRx registers
Configuring the LIC Configuration register EMx and IMAPx in the LICICR
Masking, unmasking interrupts in the LICIER registers
Clearing a pending
IRQ
in the IPRx register
Using interrupt service routines longer than 64 bytes
17.2.1 Initialization
The VBA is a 32-bit read/write register that holds the 20 MSB of the interrupt table base address.
Consequently, the 12 LSB of this register must be cleared. At bootstrap, the VBA is initialized to
the ROM base address (0x01077000), and the stack pointers of the cores are initialized to
0x01076f80 (core 0), 0x01076fa0 (core 1), and 0x01076fc0 (core 2). You can change these
values before issuing a call to any subroutine, since this address may not be available for the
stack, depending on the application. At reset, the SC140 cores disable all maskable interrupts.
When an IR occurs, the status register is pushed onto the stack, and the interrupt priority level
(IPL) of the current IR is written to SR[23–21]. All IRs with a priority level less than or equal to
the IPL of the current IR are masked. The following example programs the interrupt base address
in VBA, initializes the stack pointer and enables interrupts with priority levels 5 or 6 only. All
interrupts with priority level 4 or less are masked.
...
;Programming the VBA register to address 0x5000
move.l #$5000,vba
;Initializing the stack pointer to address 0x32000
(200KB)
move.l #$32000,r0
nop
tfra r0,sp
...
...
; Masking interrupts of priority 0,1,2,3,4
bmclr #$0040,sr.h
...
Summary of Contents for MSC8113
Page 1: ...MSC8113 Reference Manual Tri Core 16 Bit Digital Signal Processor MSC8113RM Rev 0 May 2008 ...
Page 20: ...MSC8113 Reference Manual Rev 0 xx Freescale Semiconductor Contents ...
Page 28: ...MSC8113 Reference Manual Rev 0 xxviii Freescale Semiconductor ...
Page 56: ...MSC8113 Reference Manual Rev 0 1 28 Freescale Semiconductor MSC8113 Overview ...
Page 76: ...MSC8113 Reference Manual Rev 0 2 20 Freescale Semiconductor SC140 Core Overview ...
Page 134: ...MSC8113 Reference Manual Rev 0 4 30 Freescale Semiconductor System Interface Unit SIU ...
Page 168: ...MSC8113 Reference Manual Rev 0 6 18 Freescale Semiconductor Boot Program ...
Page 180: ...MSC8113 Reference Manual Rev 0 7 12 Freescale Semiconductor Clocks ...
Page 260: ...MSC8113 Reference Manual Rev 0 8 80 Freescale Semiconductor Memory Map ...
Page 300: ...MSC8113 Reference Manual Rev 0 9 40 Freescale Semiconductor Extended Core ...
Page 304: ...MSC8113 Reference Manual Rev 0 10 4 Freescale Semiconductor MQBus and M2 Memory ...
Page 308: ...MSC8113 Reference Manual Rev 0 11 4 Freescale Semiconductor SQBus ...
Page 590: ...MSC8113 Reference Manual Rev 0 17 46 Freescale Semiconductor Interrupt Processing ...
Page 614: ...MSC8113 Reference Manual Rev 0 18 24 Freescale Semiconductor Debugging ...
Page 622: ...MSC8113 Reference Manual Rev 0 19 8 Freescale Semiconductor Internal Peripheral Bus IPBus ...
Page 724: ...MSC8113 Reference Manual Rev 0 21 32 Freescale Semiconductor UART ...
Page 920: ...MSC8113 Reference Manual Rev 0 25 150 Freescale Semiconductor Ethernet Controller ...
Page 1171: ...MSC8113 Reference Manual Rev 0 Freescale Semiconductor C 61 EF wait_rts P 01077FFC 9F rts 71 ...
Page 1172: ...MSC8113 Reference Manual Rev 0 C 62 Freescale Semiconductor MSC8113 Boot Code ...
Page 1202: ...MSC8113 Reference Manual Rev 0 Index 30 Freescale Semiconductor Index ...