Interrupt Vector Table

1. Which part of RX driver code, fills the Interrupt Vector Table with all the vectors? For example, when CMI0 interrupt happens, CPU will fetch the vector from (IntBase + 0070h). But who actually fill this table location with the vector?

2. How many different "standard" or usual ways can the vector table be filled?

3. If an interrupt is not used in the program, e.g CMI1 is not used, then what would be the vector value in (IntBase + 0074h)?

  • This all depends on the environment you use and how you generate your project.
    Do you use e2 studio with CC-RX or GCC-RX, EWRX , CS+?
    Do you use Applilet, PDG, SmartConfigurator to generate the project?

    The compiler has a #pragma interrupt, which can tell the compiler to write a function address to a specified location in the vector table.
    It depends on your project how this is being used.
  • In reply to FrankL:

    Dear Frank,
    I am using e2studio, ccrx/gnuc, sometimes with and without Smart Configurator
  • In reply to osmonn:

    Why would Smart Configurator matter?
  • In reply to osmonn:

    Because SmartConfigurator, Applilet, PeripheralDriverGenerator, project generator ... generate files to initialize the processor. Some tools include a interrupt files holding definitions for all interrupt sources so no undefined interrupt can occur.
  • In reply to osmonn:


    Has your question been answered?

    Mike Clements
    RenesasRulz Moderator
  • In reply to FrankL:

    In RX65N's mcu_interrupts.h, there is this enum definition (94 of them).

    What are they actually for and how are they used? What happens to the other 162 vectors? (There are 256 Interrupt Vector for RX65N)

    typedef enum
    BSP_INT_SRC_EXC_SUPERVISOR_INSTR = 0, /* Occurs when privileged instruction is executed in User Mode */
    BSP_INT_SRC_EXC_UNDEFINED_INSTR, /* Occurs when MCU encounters an unknown instruction */
    BSP_INT_SRC_EXC_NMI_PIN, /* NMI Pin interrupt */


    /* IE0 Group Interrupts */

    /* BE0 Group Interrupts */

    /* BL0 Group Interrupts. */

    /* BL1 Group Interrupts. */

    /* BL2 Group Interrupts. */

    /* AL0 Group Interrupts. */

    /* AL1 Group Interrupts. */

    BSP_INT_SRC_TOTAL_ITEMS /* DO NOT MODIFY! This is used for sizing the interrupt callback array. */
    } bsp_int_src_t;
  • In reply to osmonn:

    Enumerations permit the declaration of named constants in a more convenient and structured fashion than does #define.

    The enums you show can be used as vector number in interrupt definitions.

    Smart Configurator uses it as index to handle the call of interrupt callback functions. In Smart Configurator all interrupt vectors are fixed. The interrupt routines call interrupt callback routines via an user defined array of pointers to callback functions. This makes it possible for users to modify the pointer to the callback function at run time and use different callback functions depending on the actual function.

  • In reply to FrankL:

    Dear Frank,

    In this enum, BSP_INT_SRC_BL0_SCI4_TEI4 = 28

    But according to RX65N UHM, in the Interrupt Vector Table (p.456, Table 15.5), Vector No. 28 is CMI0

    I am confused. Did I get anything wrong?
  • In reply to osmonn:

    As I said, Smart Configurator uses these numbers for access to the callback table. It is not mandatory that the callback function is at the same location as the interrupt vector. I would have expected it to be the same, but I did not check it.