
Preliminary
Basic Programming Model
www.ti.com
8.3
Basic Programming Model
8.3.1 Initialization Sequence
1. Program the INTCPS_SYSCONFIG register: If necessary, enable the interface clock autogating by
setting the AUTOIDLE bit.
2. Program the INTCPS_IDLE register: If necessary, disable functional clock autogating or enable
synchronizer autogating by setting the FUNCIDLE bit or TURBO bit accordingly.
3. Program the INTCPS_ILRm register for each interrupt line: Assign a priority level and set the
FIQNIRQ bit for an FIQ interrupt (by default, interrupts are mapped to IRQ and priority is 0
[highest]).
4. Program the INTCPS_MIRn register: Enable interrupts (by default, all interrupt lines are masked).
To program the INTCPS_MIRn register, the INTCPS_MIR_SETn and INTCPS_MIR_CLEARn
registers are provided to facilitate the masking, even if it is possible for backward-compatibility to
write directly to the INTCPS_MIRn register.
8.3.2 INTC Processing Sequence
After the INTCPS_MIRn and INTCPS_ILRm registers are configured to enable and assign priorities to
incoming interrupts, the interrupt is processed as explained in the following subsections. IRQ and FIQ
processing sequences are quite similar, the differences for the FIQ sequence are shown after a '/'
character in the code below.
1. One or more unmasked incoming interrupts (M_IRQ_n signals) are received and IRQ or FIQ outputs
(IRQ/FIQ) are not currently asserted.
2. If the INTCPS_ILRm[0] FIQNIRQ bit is cleared to 0, the MPU_INTC_IRQ output signal is generated.
If the FIQNIRQ bit is set to 1, the MPU_INTC_FIQ output signal is generated.
3. The INTC performs the priority sorting and updates the INTCPS_SIR_IRQ[6:0] ACTIVEIRQ
/INTCPS_SIR_FIQ[6:0] ACTIVEFIQ field with the current interrupt number.
4. During priority sorting, if the IRQ/FIQ is enabled at the host processor side, the host processor
automatically saves the current context and executes the ISR as follows.
The ARM host processor automatically performs the following actions in pseudo code:
LR = PC + 4
/* return link */
SPSR = CPSR
/* Save CPSR before execution */
CPSR[5] = 0
/* Execute in ARM state */
CPSR[7] = 1
/* Disable IRQ */
CPSR[8] = 1
/* Disable Imprecise Data Aborts */
CPSR[9] = CP15_reg1_EEbit
/* Endianness on exception entry */
if interrupt == IRQ then
CPSR[4:0] = 0b10010
/* Enter IRQ mode */
if high vectors configured then
PC = 0xFFFF0018
else
PC = 0x00000018
/* execute interrupt vector */
else if interrupt == FIQ then
CPSR[4:0] = 0b10001
/* Enter FIQ mode */
CPSR[6] = 1
/* Disable FIQ */
if high vectors configured then
PC = 0xFFFF001C
else
PC = 0x0000001C
/* execute interrupt vector */
endif
908
Interrupt Controller
SPRUGX9 – 15 April 2011
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...