Interrupt taking longer than expected.

Hi,

Using a RCM3700, with a rf receiver. This has an interrupt pin which fires when 16bits have been received. The interrupt is connected to the rabbit. When the rabbit gets the interrupt, it must extract the 16 bit data from the rx FIFO block.

This is working well in my current code, at a 4800 baud. But I need to increase the baud rate. But the interrupt is taking 500uS.

The clock on the RCM3700 is 22.1MHz, that’s 45nS.

If it’s one click/instruction that means 500uS/45nS = 11,111 instructions.
But my code is only small. Maybe some instructions > 1 clock.

My code is below.

What’s taking so long. I wouldn’t of thought this would be more than 500 clocks (22uS).

Anyone give me any ideas

Thanks in Advance:)

Nick
England.

//
nodebug root interrupt void RF_int_nIRQ(void)
{
LED_5_ON;
DISABLED_RF_nIRQ_INT;
RF_status_word = RF01_Read_FIFO();
LED_5_OFF;
return;
}
/
/
unsigned int RF01_Read_FIFO(void)
{
auto unsigned char i;
auto unsigned int temp;
auto unsigned int FIFOword;

             FIFOword = 0;
    RF_SCLK_LOW;
             RF_SDI_LOW;
    RF_nSEL_LOW;
    RF_nSEL_LOW;
            temp=0;
            for(i=0; i<16; i++)
  	       {
                	temp<<=1;
 	if(IS_RF_SD0_SET)	temp |= 0x0001;
	RF_SCLK_HIGH;
                     RF_SCLK_LOW;
              }
if (rf_receive_state == RF_ENGAGED) return temp;

// load bits from FIFO!!!
        for(i=0; i<16; i++)
  	     {
           	FIFOword<<=1;
	if(IS_RF_SD0_SET)	FIFOword |= 0x01;
	RF_SCLK_HIGH;
                      RF_SCLK_LOW;
              }
RF_nSEL_HIGH;
        RF_nSEL_HIGH;
       ENABLED_RF_nIRQ_INT;
 return temp;

}
/*******************************************************/