4.2.4.4 Controlling interrupt level

The CC-RH can manipulate the interrupts of the RH850 family as follows in a C source.

-

By controlling interrupt level

-

By enabling or disabling acknowledgment of maskable interrupts (by masking interrupts)

In other words, the interrupt control register can be manipulated.

(1)

Controlling the interrupt priority level

For this purpose, the "__ set_il" function is used. Specify this function as follows to manipulate the interrupt priority level.

__set_il_rh(int interrupt-priority-level, void* address of interrupt control register);

 

Integer values 1 to 16 can be specified as the interrupt priority level. With RH850, sixteen steps, from 0 to 15, can be specified as the interrupt priority level. To set the interrupt priority level to "5", therefore, specify the interrupt priority level as "6" by this function.

(2)

Enable or disable acknowledgement of maskable interrupts (interrupt mask)

Specify the __ set_il function as follows to enable or disable acknowledgment of a maskable interrupt.

__set_il_rh(int enables/disables maskable interrupt, void* address of interrupt control register);

 

Integer values -3 to 0 can be specified to enable or disable the maskable interrupt.

Set Value

Operation

0

Enables acknowledgement of maskable interrupt (unmasks interrupt).

-1

Disables acknowledgment of maskable interrupt (masks interrupt).

-2

To use direct branching (standard specification) as the interrupt vector method

-3

To use table lookup (extended specification) as the interrupt vector method