NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 188 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
updated to the higher priority.
If the AIC_IPER has not been read after the NIRQ line has been asserted, then the processor will read
the new higher priority interrupt vector in the AIC_IPER register and the current priority level is
updated.
When the End of Service Command Register (AIC_EOSCR) is written, the current interrupt level is
updated with the last stored interrupt level from the stack (if any). Therefore, at the end of a higher
priority interrupt, the AIC returns to the previous state corresponding to the preceding lower priority
interrupt which had been interrupted.
Interrupt Handling
5.4.4.3
When the IRQ line is asserted, the interrupt handler must read the AIC_IPER as soon as possible (If
the H/W interrupt priority wants to be used). This can de-assert the NIRQ request to the processor and
clears the interrupt if it is programmed to be edge triggered. This allows the AIC to assert the NIRQ
line again when a higher priority unmasked interrupt occurs.
The AIC_EOSCR (End of Service Command Register) must be written at the end of the interrupt
service routine. This permits pending interrupts to be serviced.
Interrupt Masking
5.4.4.4
Each interrupt source, including FIQ, can be enabled or disabled individually by using the command
registers AIC_MECR and AIC_MDCR. The status of interrupt mask can be read from the read only
register AIC_IMR. A disabled interrupt doesn’t affect the service of other interrupts.
Interrupt Clearing and Setting
5.4.4.5
All interrupt sources (including FIQ) can be individually set or clear by respectively writing to the
registers AIC_SSCR and AIC_SCCR when they are programmed to be edge triggered. This feature of
the AIC is useful in auto-testing or software debugging.
Fake Interrupt
5.4.4.6
When the AIC asserts the NIRQ line, the processor enters interrupt mode and the interrupt handler
reads the AIC_IPER, it may happen that AIC de-asserts the NIRQ line after the processor has taken
into account the NIRQ assertion and before the read of the AIC_IPER.
This behavior is called a fake interrupt.
The AIC is able to detect these fake interrupts and returns all zero when AIC_IPER is read. The same
mechanism of fake interrupt occurs if the processor reads the AIC_IPER (application software or ICE)
when there is no interrupt pending. The current priority level is not updated in this situation. Hence, the
AIC_EOSCR shouldn’t be written.
ICE/Debug Mode
5.4.4.7
This mode allows reading of the AIC_IPER without performing the associated automatic operations.
This is necessary when working with a debug system. When an ICE or debug monitor reads the AIC
user interface, the AIC_IPER can be read. This has the following consequences in normal mode: