User guide

49
SmartBook for Renesas R8C/Tiny Microcontrollers
www.MightyMicons.com
Now, we need to go back to interrupt sequence to know more about the workings
of the interrupt mechanism. When an interrupt happens during the execution of an
instruction, the micon finalizes the priority of that interrupt and shifts the
programming control to that interrupt’s service routine after finishing the current
instruction.
The micon has a few special macro kind instructions ( RMPA, SMOVB, SMOVF,
SSTR ), which do a series of operations on a string of data. These instructions
keep repeatedly doing certain operations on a defined data string up to a defined
count. These instructions take more time depending up on the count value. When
any interrupt becomes active during the execution of any of these special
instructions, the micon finishes all the operations of the current count and then
branches to the service routine. Anyhow, you need not worry about the time
consumed by these instructions because mainly adding or moving or shifting
operations happen continuously for these special instructions. In short, whatever
happen during these special instructions are the same as that of other instructions
of the micon, and then control branches to finish the service routine. So, you
never feel any undue delay for your interrupt call when using these special
instructions.
Following are the sequence of events happening for every interrupt activation:
1. The CPU reads the interrupt information from 0000H that gives details of interrupt
number and it’s priority level. This location always keeps the information
about the highest priority interrupt that is to be serviced at the
earliest. It also clears the IR bit of that particular interrupt
to 0 to indicate that interrupt is currently engaged or
not available for other applications.
2. The FLG register is saved in an internal
temporary register.
3. The I, D and U flags of the FLG register
changes to the following:
The I flag is cleared to zero to indicate that
D
a
t
a
4
D
e
s
i
g
n
Whatever
happen during these
special macro instruc-
tions are the same as that of
other instructions of the micon,
and then control branches to fin-
ish the service
routine. So, you
never feel any un-
due delay for your
interrupt call.