Keil Logo Arm Logo

MCBSTR730 User's Guide

Keil Examples

The STMicroelectronics functions in the STR73x.LIB STR73x Software Library files are written for fast and efficient interrupt handling. They are defined with the standard __irq function attribute of the RealView Compiler as shown below:

// Timer3 IRQ: Executed each 10ms
__irq void T3TIMI_IRQHandler (void) {
  TimeVal++;                                     // Increment Tick Counter
  TIM_FlagClear(TIM3, TIM_TO_IT);
  EIC->IPR = 1 << T3TIMI_IRQChannel;
}

These "Keil-style" interrupt functions have the following requirements and benefits:

  • Disable the configuration option Setup EIC and Exception Handlers in the startup code STR73x.s. This option is required only when you are using the STMicroelectronics specific interrupt handling.
  • Due to hardware restrictions, all interrupt functions must be located within the same 64KB memory block.
  • The Keil-style interrupt functions are faster in execution compared to the STMicroelectronics specific interrupt handling since there is no additional software layer required.
  • The Keil-style interrupt functions do not change the CPU status. Therefore, the interrupt is executed in the Interrupt CPU mode which provides its own stack and avoids interrupt nesting. Interrupt nesting is possible by changing the CPU mode, but we strongly recommend keeping interrupt functions relatively short and using the features of the RTX kernel instead.

Keil logo

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.