beautypg.com

Renesas 70 User Manual

Page 91

background image

Chapter 5 Detailed Applications

- 81 -

When the I flag before issuing a service call is 1

When the I flag before issuing a service call is 0

Service call issued

service call processing

I flag

IPL

1

4

system.IPL

system.IPL

1

0

4

1

4

Service call issued

service call processing

I flag

IPL

0

4

system.IPL

system.IPL

0

0

4

Task or
Handler

Task or
Handler

Task or
Handler

Task or
Handler

4

Figure 5.13 Interrupt control in a System Call that can be Issued from a Task-independent

As shown in Figure 5.12 Interrupt control in a System Call that can be Issued from only a Task

and Figure 5.13 Interrupt control in a System Call that can be Issued from a Task-independent

, the interrupt enable flag and IPL change in a service call. For this reason, if you want to disable interrupts in a
user application, Renesas does not recommend using the method for manipulating the interrupt disable flag and
IPL to disable the interrupts.

The following two methods for interrupt control are recommended:

1. Modify the interrupt control register (SFR) for the interrupt you want to be disabled.

2. Use service calls loc_cpu and unl_cpu.

The interrupts that can be controlled by the loc_cpu service call are only the kernel(OS-dependent)
interrupt. Use method 1 to control the non-kernel(OS-independent) interrupts.