Hello,
Is there a way to mask a processor exception - such as the "spurious interrupt" exception? If not, is there a way to write an exception handling routine that would return the processor to its previous operating state? It would be great if there was an equivalent EXCEPTION() macro to the INTERRUPT() macro.
Thanks.
Brian
Masking / Handling Processor Exceptions
Re: Masking / Handling Processor Exceptions
Create an INTERRUPT function ...
Then put that function in the exception vector you want to handle...
The minor details of this are processor specific... what processor are you asking about?
The Spurious interrupt is usually exception vector 24...
So
INTERRUPT(MySpurHandler,0x2700)
{
//Count hte spurs here or something...
}
vector_base.table[24]=(long)MySpurHandler; //Spurious exception...
some other interesting entries you might want to grab...
5 -- devide by zero
2-- access error
3- address error....
etc...
Then put that function in the exception vector you want to handle...
The minor details of this are processor specific... what processor are you asking about?
The Spurious interrupt is usually exception vector 24...
So
INTERRUPT(MySpurHandler,0x2700)
{
//Count hte spurs here or something...
}
vector_base.table[24]=(long)MySpurHandler; //Spurious exception...
some other interesting entries you might want to grab...
5 -- devide by zero
2-- access error
3- address error....
etc...
Re: Masking / Handling Processor Exceptions
Beautiful! I love that the INTERRUPT macro can be reused. The processor is the Coldfire on the MOD5270B, so yes, the exception vector is 24. I'll give it a shot. Thanks!
Brian
Brian