UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
32 of 268
NXP Semiconductors
UM10413
MPT612 User manual
MSR cpsr_c, #I_Bit:OR:irq_MODE ;IRQ must be disabled
;FIQ enabled
;ARM state, IRQ mode
This arrangement requires modification of only the IRQ handler, and FIQs can be
re-enabled more quickly than by using workaround 1. However, use it only if the system
can guarantee that FIQs are never disabled while IRQs are enabled. It does not address
problem one.
9.7 VIC usage notes
If user code is running from an on-chip RAM and an application uses interrupts, interrupt
vectors must be re-mapped to on-chip address 0x0. This method is necessary because all
the exception vectors are at addresses 0x0 and above, and easily achieved by configuring
register MEMMAP (see
Section 10.7.1 “Memory mapping control register (MEMMAP -
) to User RAM mode. Link the application code so that
0x4000 0000 resides at the Interrupt Vector Table (IVT).
Although multiple sources can be selected (VICIntSelect) to generate FIQ request, use
one dedicated interrupt service routine to service all available/present FIQ request(s).
Therefore, if several interrupt sources are classified as FIQ, the FIQ interrupt service
routine must read VICFIQStatus to decide based on this content what to do and how to
process the interrupt request. However, it is recommended that only one interrupt source
is classified as FIQ. Classifying more than one interrupt source as FIQ increases the
interrupt latency.
Following the completion of the desired interrupt service routine, clearing of the interrupt
flag on the peripheral level propagates corresponding bits in VIC registers (VICRawIntr,
VICFIQStatus and VICIRQStatus). Also, before the next interrupt can be serviced, it is
necessary that write is performed into register VICVectAddr before the return from
interrupt is executed. This write clears the respective interrupt flag in the internal interrupt
priority hardware.
In order to disable the interrupt at the VIC, clear the corresponding bit in register
VICIntEnClr, which in turn clears the related bit in register VICIntEnable. This also applies
to the VICSoftInt and VICSoftIntClear in which VICSoftIntClear clears the respective bits
in VICSoftInt. For example, VICSoftIntClear = 0x0000 0001 clears
VICSoftInt = 0x0000 0005 if bit 0 must be cleared. Assign VICSoftIntClear = 0x0000 0000
before the new clear operation is next performed on the same bit in VICSoftInt by writing
to VICSoftIntClear. Therefore writing logic 1 to any bit in register Clear has a
one-time-effect in the destination register.
If the watchdog is enabled for interrupt on underflow or invalid feed sequence only, then
there is no way of clearing the interrupt. The only way you can perform return from
interrupt is by disabling the interrupt at the VIC (using VICIntEnClr).
Example:
Assuming that UART0 and SPI0 are generating interrupt requests that are classified as
vectored IRQs (UART0 being on the higher level than SPI0), while UART1 and I
2
C are
generating non-vectored IRQs, the following is one possibility for VIC setup:
VICIntSelect = 0x0000 0000 ; SPI0, I2C0, UART1 and UART0 are IRQ =>
; bit10, bit9, bit7 and bit6=0