Keil Logo


Information in this article applies to:

RealView-MDK, All Versions


What are the different ways to handle interrupts, on the ST Microelectronics STR7 series microcontrollers?


Keil supplies examples of two different methods to handle IRQ exceptions on the STR7xx devices: the Direct Vector method, and the Table method.

Direct Vector Method

The STR7 interrupt controller uses a 16+16 bit (Base:Offset) to store interrupt vector addresses. All interrupt vectors use the same 16-bit base address which forms the upper 16 bits of the interrupt vector. The advantage to this method is that it is fast.  The disadvantage is that all interrupt vectors must point to code within the same 64Kb block of memory. If each vector points directly to the handler code, then each handler must reside in the 64Kb space.

Table Method

Another method is to declare a single IRQ handler for the program, and use this routine as a dispatcher to call separate handler functions for each interrupt source. The advantage of this second method is that the dispatcher and the handler functions may reside anywhere in memory. The disadvantage is increased interrupt latency, due to the extra layer of overhead that the dispatcher adds to the program.

To see examples of these different methods, see the following sample programs, in your RealView-MDK installation folder.

  • ARM\RV30\Boards\ST\STR710\Blinky (direct)
  • ARM\RV30\Boards\ST\STR710\ST_blinky (table)

In the ST_Blinky example, the file 71x_it.c contains the handler table. Each interrupt source has an entry in the table. An example of an active entry looks like this:

extern void TimeTick (void);

void T3TIMI_IRQHandler(void)
  TIM_FlagClear(TIM3, TIM_TO_IT);

Inactive entries simply contain stub functions.


Last Reviewed: Tuesday, April 1, 2008

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.