Keil™, An ARM® Company

MCBSTR7 User's Guide

Locating Interrupts

To locate interrupt functions within the same memory block, you may define two memory regions in the dialog Project - Options - Target as shown below. The memory area might be less than 64KB, but must reside within the same 64KB memory block.

Target Options

Modules that contain interrupt functions are assigned to this memory block using the Properties dialog that opens from the context menu in the Project Workspace.

  • Right click on the file to open the Properties dialog and select the Memory Assignment for Code/Const as shown below:

irq options

Enable the interrupt function using the following STR7 Library Functions. In addition, you need to set the IRQ vector as shown in the highlighted source lines.

// Configure and enable IRQ for Timer 3
  EIC->IVR = (u32)T3TIMI_IRQHandler;                // setup IRQ vector
  EIC->SIR[T3TIMI_IRQChannel] = ((u16)T3TIMI_IRQHandler << 16);
  EIC_IRQChannelConfig(T3TIMI_IRQChannel, ENABLE);
  EIC_IRQChannelPriorityConfig(T3TIMI_IRQChannel, 1);

// only required when Advanced RTX is not used.
  EIC_IRQConfig(ENABLE);                            // Configure IRQ