Pular para o conteúdo principal
Knowledgebase
Home
Renesas Brasil - Knowledgebase

Will process 1 be executed to the timing of interrupt request process?

Latest Updated:03/01/2005

Question:

(Interrupts)   In the program below, if I set the interrupt request bit as "A_FLAG" and execute function func( ) in interrupt enabled state, will Process 1 be executed according to the timing of the interrupt request process execution after the interrupt request is generated?

void func(void)
{
    ···
    if( A_FLAG == 1 ){
           Process 1 (process for when interrupt request is generated)
    } else {
           Process 2 (process for when interrupt request is not generated)
    }
    ···
}

(Do not execute an instruction to control the interrupt enable bit just prior to checking the A_FLAG.) [2005/03/01]

Answer:

Due to the timing of the interrupt request generation, the interrupt request bit may be determined as "1". If so, Process 1 will be executed. (#104772)
Suitable Products
3803H
3803L
3823
3850A
3858
38D2
38D5
7544
7545
7546
7547
7548
7549