# Separate Inst Data and interrupts

**URL:** <https://forums.digi.com/t/separate-inst-data-and-interrupts/10628>\
**Category:** Rabbit\
**Created:** [July 27, 2011, 4:59pm UTC](https://forums.digi.com/t/separate-inst-data-and-interrupts/10628 "2011-07-27T16:59:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmcarth](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@drmcarth](https://forums.digi.com/u/drmcarth)\
**Post date:** [July 27, 2011, 4:59pm UTC](https://forums.digi.com/t/separate-inst-data-and-interrupts/10628/1 "2011-07-27T16:59:43Z")

</div>

I’m writing code for an RCM3209 with Dynamic C. I’m trying to use the “Enable separate instruction and data spaces” option. When I select this option, the following code generates a compile error:

#if **SEPARATE\_INST\_DATA**  
interrupt\_vector ext1\_intvec scannerISR;  
#else  
SetVectExtern3000(1, scannerISR); // set up ISR  
#endif

The error is “Vector ext1\_intvec undefined”.

I am trying to register an ISR for external interrup 1 (PE1). The above code structure is copied straight out of the Dynamic C user’s manual (page 182 in my version, section 11.7.2 Modifying Interrupt Vectors).

I’ve seen examples that add the \_RK\_FIXED\_VECTORS macro to the conditional statement:

#if **SEPARATE\_INST\_DATA** && (\_RK\_FIXED\_VECTORS)

My code now compiles, but it’s because the conditional always evaluates as false, so the “interrupt\_vector ext1\_intvec scannerISR;” gets skipped.

What is recommended? I’ve read that if I don’t use the interrupt\_vector keyword my ISR will take 80 clocks longer to complete (with separate inst and data enabled). What is the proper way to handle this?
