beautypg.com

Renesas 70 User Manual

Page 86

background image

Chapter 5 Detailed Applications

- 76 -

5.2.3 Writing

Non-kernel(OS-independent) Interrupt Handler

1. For the symbol indicating the interrupt handler start address, make the external declaration

(public declaration).

2. Make sure that the registers used in a handler are saved at the entry and are restored after

use.

3. Be sure to end the handler by REIT instruction.

4. No service calls can be issued from a non-kernel(an OS-independent) interrupt handler.

NOTE: If this restriction is not observed, the software may malfunction.

5. If you want multiple interrupts to be enabled in a non-kernel(an OS-independent) interrupt

handler, always make sure that the non-kernel(OS-independent) interrupt handler is as-
signed a priority level higher than other non-kernel(OS-dependent) interrupt handlers.

54

.GLB

inthand

-----

(1)

inthand:

; Registers used are saved to a stack

----- (2)

; interrupt process
; Registers used are restored

----- (2)

REIT

-----

(3)

Figure 5.9 Example of Non-kernel(OS-independent) Interrupt Handler of Specific Level

54

If you want the non-kernel(OS-independent) interrupt handler to be assigned a priority level lower than kernel(OS-dependent) interrupt

handlers, change the description of the non-kernel(OS-independent) interrupt handler to that of the kernel (OS-dependent) interrupt handler.