跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

How to shorten time until interrupt function processing starts(CC-RL)

Last Updated:06/28/2017

Question:

I am using RL78 Compiler CC-RL.

I want to shorten the time required for the interrupt function processing to start. Is there any way to do that?

I have already taken measures in order not to let the interrupt function call other functions.

Answer:

At the beginning of an interrupt function, codes for saving general-purpose registers exist.

If you want to reduce the codes for saving/restoring general-purpose registers from an interrupt function, you can achieve this by specifying a register bank in #pragma interrupt.

When you specify a register bank, a sel instruction for switching register banks is output rather than a push/pop instruction for saving/restoring registers. This reduces the number of instructions and consequently the time required for the interrupt function processing to start.

Note that when interrupt functions with the same register bank specified are run concurrently, the values of general-purpose registers in the specified register bank are overwritten.

(Example) When specifying register bank 1

#pragma interrupt   inter (vect=INTP0, bank=RB1)

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family
  • 本文是否實用?