Skip to main content
Renesas Electronics America - Knowledgebase

Interrupt Priority and Interrupt Enable Registers (IPR and IER)

Last Updated:06/08/2017


I set the interrupt priority register (IPR) and interrupt enable register (IER) according to the interrupt vector table on the user’s manual, but no interrupts occur. What is wrong?


In the interrupt vector table on the user’s manual, the IER is described in hexadecimal numbers and the IPR in decimal numbers. Therefore, the program (C language) needs to be described as shown in the following examples.

(Example1) RX63N group CMT0 CMI0
    User's manual                  Program
    IER03.IEN3          →         ICU.IER[0x3].BIT.IEN3 or ICU.IER[3].BIT.IEN3
    IPR003                  →         ICU.IPR[0x3].BIT.IPR  or ICU.IPR[3].BIT.IPR

(Example2) RX63N group TMR0 CMIA0
    User's manual                  Program
    IER15.IEN2          →         ICU.IER[0x15].BIT.IEN2 or ICU.IER[21].BIT.IEN2
    IPR170                  →         ICU.IPR[0xAA].BIT.IPR or ICU.IPR[170].BIT.IPR

When setting IPR [060], a compiler is taken as octal numbers and the front of a integer literal is added with "0".
We recommend using a macro definition to avoid this problem by using the macro definition described in iodefine.h.

(Example1) RX63N group CMT0 CMI0

(Example2) RX63N group TMR0 CMIA0

Suitable Products
RX Family