
DocID13284 Rev 2
101/564
UM0404
Interrupt and trap functions
The
Interrupt Request Flag
is set by hardware whenever a service request from the
respective source occurs. It is cleared automatically upon entry into the interrupt service
routine or upon a PEC service. In the case of PEC service the Interrupt Request flag
remains set, if the COUNT field in register PECCx of the selected PEC channel decrements
to zero. This allows a normal CPU interrupt to respond to a completed PEC block transfer.
Note:
Modifying the Interrupt Request flag via software causes the same effects as if it had been
set or cleared by hardware.
5.1.4
Interrupt priority level and group level
The four bits of ILVL bit-field specify the priority level of a service request for the arbitration
of simultaneous requests. The priority increases with the numerical value of ILVL, so 0000b
is the lowest and 1111b is the highest priority level.
When more than one interrupt request on a specific level gets active at the same time, the
values in the respective bit fields GLVL are used for second level arbitration to select one
request for being serviced. Again the group priority increases with the numerical value of
GLVL, so 00b is the lowest and 11b is the highest group priority.
Note:
All interrupt request sources that are enabled and programmed to the same priority level
must always be programmed to different group priorities. Otherwise an incorrect interrupt
vector will be generated.
Upon entry into the interrupt service routine, the priority level of the source that wins the
arbitration and whose priority level is higher than the current CPU level, is copied into ILVL
bit-field of register PSW after pushing the old PSW contents on the stack.
The interrupt system of the ST10F276 allows nesting of up to 15 interrupt service routines of
different priority levels (level 0 cannot be arbitrated).
Interrupt requests that are programmed to priority levels 15 or 14 (ILVL = 111Xb) will be
serviced by the PEC, unless the COUNT field of the associated PECC register contains
zero. In this case the request will instead be serviced by normal interrupt processing.
Interrupt requests that are programmed to priority levels 13 through 1 will always be
serviced by normal interrupt processing.
Bit
Function
GLVL
Group Level
Defines the internal order for simultaneous requests of the same priority.
’3h’: Highest group priority
’0h’: Lowest group priority
ILVL
Interrupt Priority Level
Defines the priority level for the arbitration of requests.
’Fh’: Highest priority level
’0h’: Lowest priority level
xxIE
Interrupt Enable Control bit
(individually enables/disables a specific source)
‘0’: Interrupt Request is disabled
‘1’: Interrupt Request is enabled
xxIR
Interrupt Request Flag
‘0’: No request pending
‘1’: This source has raised an interrupt request