English
Language : 

SH7785 Datasheet, PDF (329/1692 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
10. Interrupt Controller (INTC)
Bit
Name
31 to 24 (Code for
writing)
23 to 8 —
7 to 4 UIMASK
3 to 0 —
Initial
Value R/W
H'00 R/W
All 0 R
0
R/W
All 0 R
Description
Code for writing (H'A5)
These bits are always read as 0. Set these bits to H'A5
when writing to the UIMASK bits (Write to the UIMASK
bits with these bits set to H'A5).
Reserved
These bits are always read as 0. The write value
should always be 0.
Interrupt Mask Level
The interrupts whose level is equal to or lower than the
value set in the UIMASK bits are masked.
Reserved
These bits are always read as 0. The write value
should always be 0.
(2) Procedure for Using the User Interrupt Mask Level Register
By setting the interrupt mask level in USERIMASK, the interrupts whose level is equal to or
lower than the value set in USERIMASK are disabled. This function is used to disable less urgent
interrupts when more urgent processing is performed by the tasks such as device drivers operating
in user mode to reduce the processing time.
USERIMASK is allocated in a different 64-Kbyte space apart from the one where other INTC
registers are allocated. Access to this register in user mode involves address translation by the
MMU. In a multitasking OS, the memory-protection functions of the MMU should be used to
control the processes that can access USERIMASK. Clear USERIMASK to 0 before completing a
task or switching to another task. If a task is completed with the UIMASK bits set to a value other
than 0, the interrupts whose level is equal to or lower than UIMASK remain disabled. This can
lead to problems, for example, the OS may not be able to switch between tasks.
An example procedure for using USERIMASK is described below.
1. Classify interrupts into A and B, as described below. Then, set the interrupt level of A-type
interrupts higher than that of the B-priority interrupts.
A. Interrupts to be accepted by device drivers (interrupts used in the OS, such as a timer
interrupt)
B. Interrupts that should not be accepted by device drivers
2. Set the MMU so that the access to the address space containing USERIMASK is only allowed
for the device drivers that need to disable the interrupts.
Rev.1.00 Jan. 10, 2008 Page 299 of 1658
REJ09B0261-0100