English
Language : 

C165UTAH Datasheet, PDF (116/539 Pages) Infineon Technologies AG – EMBEDDED C166 WITH USART IOM-2 AND HDLC SUPPORT
C165UTAH
Interrupt and Trap Functions
For a specific request to be arbitrated the respective source’s enable bit and the global
enable bit must both be set.
The Priority Level automatically selects a certain group of interrupt requests that will be
acknowledged, disclosing all other requests. The priority level of the source that won the
arbitration is compared against the CPU’s current level and the source is only serviced,
if its level is higher than the current CPU level. Changing the CPU level to a specific value
via software blocks all requests on the same or a lower level. An interrupt source that is
assigned to level 0 will be disabled and never be serviced.
The ATOMIC and EXTend instructions automatically disable all interrupt requests for
the duration of the following 1...4 instructions. This is useful eg. for semaphore handling
and does not require to re-enable the interrupt system after the unseparable instruction
sequence (see chapter “System Programming”).
Interrupt Class Management
An interrupt class covers a set of interrupt sources with the same importance, ie. the
same priority from the system’s viewpoint. Interrupts of the same class must not interrupt
each other. The C165UTAH supports this function with two features:
Classes with up to 4 members can be established by using the same interrupt priority
(ILVL) and assigning a dedicated group level (GLVL) to each member. This functionality
is built-in and handled automatically by the interrupt controller.
Classes with more than 4 members can be established by using a number of adjacent
interrupt priorities (ILVL) and the respective group levels (4 per ILVL). Each interrupt
service routine within this class sets the CPU level to the highest interrupt priority within
the class. All requests from the same or any lower level are blocked now, ie. no request
of this class will be accepted.
The example below establishes 3 interrupt classes which cover 2 or 3 interrupt priorities,
depending on the number of members in a class. A level 6 interrupt disables all other
sources in class 2 by changing the current CPU level to 8, which is the highest priority
(ILVL) in class 2. Class 1 requests or PEC requests are still serviced in this case.
The 19 interrupt sources (excluding PEC requests) are so assigned to 3 classes of
priority rather than to 7 different levels, as the hardware support would do.
Data Sheet
116
2001-02-23