How to use RIO interrupt with RCM 6760.

We have RIO connect to RCM6760. I want to use interrupt method whenever RIO input is toggle. Can you point me to the right direction?

I tried the following and it is not working for me.

codes:
main()
{
WrPortI(PEDDR, &PEDDRShadow, 0x00); // set port E as all inputs
SetVectExtern(1, my_isr1);
WrPortI(I1CR, &I1CRShadow, 0x09); // enable external INT1 on PE5, rising
edge,priority 1

WrPortE(MCR_REG,NULL,0x01);//enble interuppt for IO

}

If you monitor that I/O line, do you see the RIO chip change it’s state?

If you connect that input to a switch, can you manually trigger the interrupt?

I just want to confirm that the problem is with the code you posted (triggering the interrupt on the Rabbit) and not with the RIO configuration (generating the interrupt signal to the Rabbit).

Yes, i can see the BL01 toggle if i manually query the data Here us the code to get data


int checkSoftIntlk(void)
{
    int readbit;

    WrPortE(BL1, NULL,P3CR);
    readbit=RdPortE(IR1); 
    readbit=readbit>>6;  //right shift high byte
    readbit &= 0x01;  //only bit 2 of port 1
    if (readbit)
        return TRUE;
    else
        return FALSE;
}

I was wondering about the PE5 input on the Rabbit. I want to isolate whether the RIO is failing to toggle the input, or if the Rabbit is failing to trigger the ISR.

I connect the scope on PE5 and no activities. Should i disconnect this pin (PE5) from RIO?

Chi

So it sounds like a problem with your RIO configuration – it isn’t signaling the interrupt on that line. You could disconnect from PE5 and monitor the I/O line from the RIO to see if it’s changing. Maybe the Rabbit is configured to drive PE5 and the RIO isn’t able to pull it low/high.

Review the documentation and perhaps code in Dynamic C 10 for the BLxSxxx products to see how they configure the RIO. I don’t have direct experience with that chip, and would just be looking through code and schematics like you need to be doing right now.

You could disconnect PE5 from the RIO and wire it to a button (or just a wire that you connect to ground or Vcc as appropriate) to verify that your interrupt routine fires. That will at least validate the Rabbit side of your setup.