Mariano Filippa

Use of #pragma interrupt

Discussion created by Mariano Filippa on Mar 3, 2006
Latest reply on Mar 13, 2006 by Mariano Filippa
Hello all,
 
I'm working with 56F801 DSP for AC motor control. In my current software, several functions are being called from an ISR. This is what I have:
 
-----------
From vector jumps:
 ...  jsr ISR_Function   // jump to ISR function  ...
-----------
void ISR_Function{
#pragma interrupt warn
    SecondFunction();    // call SecondFunction
}
-----------
#pragma interrupt called
void SecondFunction{
   AsmFunction();       // call assembly function
}
-----------
#pragma interrupt called
asm void AsmFunction{
    nop       // do something
}
 
Questions:
1) are the pragmas correctly used? For some reason, I'm still getting warnings that a non-interrupt function is being called from an interrupt function.
2) what happens if I call SecondFunction from a non-interrupt function (say MainBackgroundTask)?
3) Is there any special requirement for interrupt-called assembly functions?
 
Thanks!
Mariano

Outcomes