how to check if interrupt service routine is triggering?


I am debugging a board with RX630 processor (R5F5630ACDFB#V0). I use various peripheral functions, such as RIIC, RSPI, DMAC, SCI, MTU, CMT. I have the interrupt service routines coded as per various examples in Renesas example code. I have included the prototypes for the ISRs in my main.h. I get no errors in the build.

However, if i place a simple statement such as:


in any of the ISRs, it never gets executed.

I have initiated the port pin as an output.

I never observe P7.4 toggling and if i set a breakpoint in the interrupt, it never arrives. 

Is this behavior expected? If not, then what is it that i'm doing wrong?

I am running E2 Studio V7.8 with CCRX tools.


An example of one of the ISR functions for MTU1:

* Function name: mtu1_isr
* Description : ISR for mtu interrupt
* Arguments : none
* Return value : none
#pragma interrupt (mtu1_isr (vect=VECT(MTU1, TGIA1)))
static void mtu1_isr (void)

IR(MTU1, TGIA1) = 0; /* Clear any pending MTU1 interrupt */


I am having a really difficult time trying to figure out why ISRs are not triggering in my code. 

  • If i put the bit-toggling in the main "while" loop:

    if(IR(MTU1, TGIA1))
    IR(MTU1, TGIA1) = 0; /* Clear any pending MTU1 interrupt */

    then i see the bit flipping as expected.

    So, why is it that placing the code in the ISR itself doesn't work? These ISRs used to work in the prior RX210 board build. What is the difference between the RX630 and the RX210 in terms of ISR handling?
  • I think that i may have answered my own question - almost.

    Could it be the Group Interrupt registers that are causing the interrupts never to fire? I'm referring to GRPm, GENm and GCRm registers. Are there any other settings related to these that i should be aware of? This would explain the ISR code working on the RX210 and not on the RX630.

    I could not find settings nor any mention for these registers anywhere in the sample code for the RX630.

    Can anyone provide a link to or an example of settings for these registers for one of the peripherals indicating how they affect the corresponding ISRs? The manual is less than clear on this subject.

    Thanks in advance.


    P.S.: I found an example for the group interrupts for the RX630 but it is unintelligible due to the fact that it uses FIT and so i cannot use it. I am using standard C. Does anyone have this code example, or one like it, broken down into standard C? 

  • I have started trying to code for the group interrupts. FOr MTU1 interrupt, which is shared with TPU7, i have the following:

       ICU.GRP[01].BIT.IS1 = 1; // MTU1 group interrupt source GRP01.IS1

       ICU.GEN[01].BIT.EN1 = 1; // MTU1 group interrupt enable GEN01.EN1

       ICU.SEL[01].BIT.CN1 = 0; // MTU1 group interrupt MTU/TPU selection: 0= MTU1; 1=TPU1;

    however, the line:

      ICU.SEL[01].BIT.CN1 = 0;

    gives an error: Expression must have pointer-to-object type.

    What is the correct syntax for this? I cannot find it anywhere. Can anyone help with this problem?


  • Hi Norberto,

    I'm not using this device so I can't really help with the actual troubleshooting. However, can you check this sample code if this works for you: You can insert your code in the SCI ISR to confirm if the ISR is really being executed. This way you can compare why your program doesn't execute its the MTU1 ISR.

    RenesasRulz Forum Moderator

  • Hi JB,

    Thanks for helping, it's very much appreciated. I've been stuck for a long time on this already.

    Yes, i did look at this code already, but i did not understand it. This is the FIT driver, am i correct? I find it indecipherable and too complex for my use, when all i want is to enable a few interrupts at startup. Most of my code is already written using regular C (no drivers) and it would take a long time to come up to speed and rewrite the code using FIT.

    I have started writing code for the Group Interrupts using regular C expressions, but i am getting a build error when i write:

     ICU.SEL[01].BIT.CN1 = 0;

    of: "Expression must have pointer-to-object type". I can't find the meaning of this error and don't know how to fix it. I have experimented with different syntax but i get errors with all of them. What i need is a valid syntax for this, or better yet, some example code for setting these registers, but written in regular C, not using FIT.

    It's beginning to seem that this request is unreasonable or impossible. Is this the case? Please be honest. What am i missing here? Is there nobody that has written code for the Interrupt Group registers for the RX630 in regular C, given that the RX630 must be fairly popular? I haven't been able to find any examples of this type, so i am winging it, but it is not looking good at the moment. All i have to do is run the code once during initialization. 

    think that this is the problem (Group Interrupts) i am encountering with a few ISRs not triggering, as it seems the most logical deduction, but i can't be sure.

    Is there anyone at Renesas that might be an expert in this and lend a hand?

    Thanks again and, if you would, could you please point me to sme C example code on this or advise me on what i am doing wrong?

    With appreciation,


  • JB,

    I sincerely apologize. I should have given the code at the links you sent another look. I had checked another link to FIT drivers a while ago and i mistook this for the same FIT driver version which i had downloaded and looked at. Thank you again!

    I originally based my project on this code and this code is giving me the ISR problems. The interrupts for SCI, MTU, etc. never fire. The code for the SCI, etc. is very similar.

    However, in looking over the various files, i found that my vecttbl.c and resetprg.c are different from the files you sent me. My files are a much earlier version of the RX630 example code. The date on my vecttbl.c is still based on version 0.11 of the manual. The new one is marked as 0.50 version and is quite different.

    I have now replaced my older vecttbl.c and restprg.c with the ones you sent to me. Now when i build the project, i get an error of "section address overflow out of range: FIXEDVECT". I will need to adjust the section addresses for the new vecttbl.c. Do i do that in the Project Properties of hte IDE or do i do that in vecttbl.c? This is new to me.

    I want to apologize again for my erroneous assumptions and thick-headedness. I hope that modifying these two files will allow the ISRs to function.

    Again, thank you very much for the links!

  • Going to start a new solutions forthcoming from this one.
Reply Children
No Data