| |||
| Home > Example Code > About the example code > Simple interrupt initialization | |||
Example B.8 shows how you can use the interrupt controller without using vectored interrupts, or the interrupt priority hardware. For example, you can use it for debugging.
Example B.8. Simple interrupt initialization
LDR r0, =IntCntlBase
MOV r1, #<interrupt_to_enable>
LDR r2, [r0, #IntSelectOffset] ; Select IRQ interrupt
BIC r2, r2, r1
STR r2, [r0, #IntSelectOffset]
STR r1, [r0, #IntEnableOffset] ; Enable interrupt
MRS CPSR_c, #(DISABLE_IRQ + MODE_SYS_32) ; Enable FIQ interrupts