Download 1 PRODUCT OVERVIEW

Transcript
S3C44B0X RISC MICROPROCESSOR
INTERRUPT CONTROLLER
INTERRUPT PRIORITY
If source A is configured to FIQ and source B is configured to IRQ, source A has higher priority than source B
because a FIQ interrupt has higher priority than an IRQ interrupt in all cases.
If source A and source B are in different master groups and the master group priority of source A is higher than the
master group priority of source B, the priority of source A is higher than source B.
If source A and source B are in the same master group and source A has higher priority than source B, source A
has the higher priority.
The priorities of sGA, sGB, sGC, and sGD are always higher than those of sGKA and sGKB. The priorities among
sGA,sGB,sGC and sGD are programmable or are determined by the round-robin method. Between sGKA and sGKB,
sGKA has always the higher priority.
The group priority of mGA, mGB, mGC, and mGD are always higher than that of mGKA and mGKB. So, the
priorities of mGKA and mGKB are the lowest among the other interrupt sources. The group priority among mGA,
mGB, mGC and, mGD is programmable or is determined by the round-robin method. Between mGKA and mGKB,
mGKA always has the higher priority.
VECTORED INTERRUPT MODE (ONLY FOR IRQ)
S3C44B0X has a new feature, the vectored interrupt mode, to reduce the interrupt latency time.
If ARM7TDMI receives the IRQ interrupt request from the interrupt controller, ARM7TDMI executes an instruction at
0x00000018. In vectored interrupt mode, the interrupt controller will load branch instructions on the data bus when
ARM7TDMI fetches the instructions at 0x00000018. The branch instructions let the program counter be a unique
address corresponding to each interrupt source.
The interrupt controller generates the machine code for branching to the vector address of each interrupt source. For
example, If EINT0 is IRQ, the interrupt controller must generate the branch instruction which branches from 0x18 to
0x20. So, the interrupt controller generates the machine code, 0xea000000.
The user program code must locate the branch instruction, which branches to the corresponding ISR (interrupt
service routine) at each vector address. The machine code, branch instruction, at the corresponding vector address
is calculated as follows;
Branch Instruction machine code for vectored interrupt mode
= 0xea000000 +((<destination address> - <vector address> - 0x8)>>2)
For example, if Timer 0 interrupt to be processed in vector interrupt mode, the branch instruction, which jumps to the
ISR, is located at 0x00000060. The ISR start address is 0x10000. The following 32bit machine code is written at
0x00000060.
machine code@0x00000060 : 0xea000000+((0x10000-0x60-0x8)>>2) = 0xea000000+0x3fe6 = 0xea003fe6
The machine code is usually generated automatically by the assembler and therefore the machine code does not
have to be calculated as above.
11-5