Public Version
www.ti.com
Interrupt Controller Basic Programming Model
status register BIC R0, R0, #0x80/0x40 /* Clear the I/F bit MSR CPSR, R0 /* Write it back to
enable IRQs /* Step 8 : Jump to relevant subroutine handler LDR PC, [PC, R10, lsl #2] /* PC base
address points this instr 8 NOP /* To index the table by the PC /* Table of handler start
addresses .word IRQ0handler ;IRQ0 BANK0 .word IRQ1handler .word IRQ2handler
After the return of the relevant IRQ/FIQ subroutine handle :
1. Disable IRQs/FIQs at ARM side.
2. Restore the MPU_INTC.
PRIORITYTHRESHOLD field.
3. Restore the ARM critical context registers.
The sample code below shows the three previous steps:
CAUTION
The code below is an assembly code compatible with ARM architecture V6 and
V7. This code is developed for the Texas Instruments Code Composer Studio
tool set. It is a draft version, only tested on an emulated environment.
IRQ_ISR_end: /* Step 1 : Read-modify-write the CPSR to disable IRQs/FIQs at ARM side MRS R0, CPSR
/* Read the CPSR ORR R0, R0, #0x80/0x40 /* Set the I/F bit MSR CPSR, R0 /* Write it back to
disable IRQs /* Step 2 : Restore the INTCPS_THRESHOLD register from R12 LDR R0,
INTCPS_THRESHOLD_ADDR STR R12, [R0] /* Step 3 : Restore critical context MSR SPSR, R11 /* Restore
the SPSR from R11 LDMFD SP!, {R0-R12, LR} /* Restore working registers and Link register /*
Return after handling the interrupt SUBS PC, LR, #4
shows the nested IRQ/FIQ processing sequence from the originating device peripheral
module to the main program interruption.
2419
SWPU177N – December 2009 – Revised November 2010
Interrupt Controller
Copyright © 2009–2010, Texas Instruments Incorporated
Содержание OMAP36 Series
Страница 174: ...174 List of Tables SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 692: ...692 MPU Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1084: ...1084 IVA2 2 Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1990: ...1990 2D 3D Graphics Accelerator SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2334: ...2334 Memory Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2700: ...2700 Memory Management Units SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2868: ...2868 HDQ 1 Wire SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2974: ...2974 UART IrDA CIR SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3054: ...3054 Multichannel SPI SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3462: ...3462 MMC SD SDIO Card Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3508: ...3508 General Purpose Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3584: ...3584 Initialization SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3648: ...3648 Debug and Emulation SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...