M.Rehan
Full Member level 2
Is it better to call a function in interrupt routine which has large instructions as given below
My questions are if interrupt_1() calls function_1()
and is executing(not completed yet) and then interrupt_2 occurs.
1. will it handle interrupt_2 Routine leaving Function_1
2. After calling func_2() Which function will be executed first function_1() or Func_2() by keeping above scenario in mind
both interrupts have same priority
;-) Have a Good Day
Code:
Interrupt_1()
{
Function();
}
Interrupt_2()
{
Func_2();
}
void Function_1()
{
PORTA=0;
PORTB= 0;
Delay_ms(1000);
and further code
}
void Func_2()
{
PORTA=0;
PORTB= 0;
Delay_ms(1000);
and further code
My questions are if interrupt_1() calls function_1()
and is executing(not completed yet) and then interrupt_2 occurs.
1. will it handle interrupt_2 Routine leaving Function_1
2. After calling func_2() Which function will be executed first function_1() or Func_2() by keeping above scenario in mind
both interrupts have same priority
;-) Have a Good Day