
DocID13284 Rev 2
105/564
UM0404
Interrupt and trap functions
Byte/word transfer bit BWT
controls if a byte or a word is moved during a PEC service
cycle. This selection controls the transferred data size and the increment step for the
modified pointer.
Increment control field INC
controls if one of the PEC pointers is incremented after the
PEC transfer. It is not possible to increment both pointers, however. If the pointers are not
modified (INC=’00’), the respective channel will always move data from the same source to
the same destination.
Note:
The reserved combination ‘11’ is changed to ‘10’ by hardware. Do not to use this
combination.
PEC transfer count field COUNT
controls the action of a respective PEC channel, where
the content of bit field COUNT at the time the request is activated selects the action.
COUNT may allow a specified number of PEC transfers, unlimited transfers or no PEC
service at all.
The table below summarizes how the COUNT field itself, the interrupt requests flag IR and
the PEC channel action, depend on the previous content of COUNT.
The PEC transfer counter allows to service a specified number of requests by the respective
PEC channel, and then (when COUNT reaches 00h) activate the interrupt service routine,
which is associated with the priority level. After each PEC transfer the COUNT field is
decremented and the request flag is cleared to indicate that the request has been serviced.
Continuous transfers
are selected by the value FFh in bit-field COUNT. In this case
COUNT is not modified and the respective PEC channel services any request until it is
disabled again.
When COUNT is decremented from 01h to 00h after a transfer, the request flag is not
cleared, which generates another request from the same source. When COUNT already
contains the value 00h, the respective PEC channel remains idle and the associated
interrupt service routine is activated instead. This allows to choose, if a level 15 or 14
request is to be serviced by the PEC or by the interrupt service routine.
Note:
PEC transfers are only executed if their priority level is higher than the CPU level: for
example only PEC channels 7...4 are processed while the CPU executes on level 14. All
interrupt request sources that are enabled and programmed for PEC service should use
different channels. Otherwise only one transfer will be performed for all simultaneous
requests. When COUNT is decremented to 00h, and the CPU is to be interrupted, an
incorrect interrupt vector will be generated.
Previous
COUNT
Modified
COUNT
IR after PEC
service
Action of PEC channel and comments
FFh FFh ‘0’
Move a byte / word
Continuous transfer mode, COUNT is not modified
FEh..02h
FDh..01h
‘0’
Move a byte / word and decrement COUNT
01h 00h ‘1’
Move a byte / word
Leave request flag set, which triggers another
request
00h 00h (‘1’)
No action!
Activate interrupt service routine rather than PEC
channel.