dsPIC33E/os_dsPIC33E_APIsB.c
// Interrupt Service Routine 
// Author           : Fabian Kung
// Last modified	: 9 March 2019
// Purpose          : These routine handles various hardware traps or exception.s 
//                    Basically we stalled the processor when math error occurs.
//                    To indicate to the user that math exception occurs, we 
//                    blink indicator LED1 rapidly.
// Arguments		: None
// Return           : None

Interrupt Service Routine
Author           : Fabian Kung
Last modified  : 9 March 2019
Purpose          : These routine handles various hardware traps or exception.s
Basically we stalled the processor when math error occurs.
To indicate to the user that math exception occurs, we
blink indicator LED1 rapidly.
Arguments              : None
Return           : None
Interrupt Service Routine Author : Fabian Kung Last modified : 9 March 2019 Purpose : These routine handles various hardware traps or exception . s Basically we stalled the processor when math error occurs . To indicate to the user that math exception occurs we blink indicator LED1 rapidly . Arguments : None Return : None
void __attribute__((__interrupt__)) _MathError( void )
{
    PIN_ILED2 = 0;						
    PIN_PSW = 0;                        
    while (1)
    {
        ClearWatchDog();			    
        PIN_OSPROCE1 = 1; 				
        PIN_ILED2 = 1;					
    }
}
void __attribute__ ( ( __interrupt__ ) ) _MathError ( void ) { PIN_ILED2 = 0 ; PIN_PSW = 0 ; while ( 1 ) { ClearWatchDog ( ) ; PIN_OSPROCE1 = 1 ; PIN_ILED2 = 1 ; } }
Interrupt Service Routine
Author           : Fabian Kung
Last modified  : 9 March 2019
Purpose          : These routine handles various hardware traps or exception.s
Basically we stalled the processor when math error occurs.
Interrupt Service Routine Author : Fabian Kung Last modified : 9 March 2019 Purpose : These routine handles various hardware traps or exception . s Basically we stalled the processor when math error occurs .
// Turn off indicator LED2.
 // Turn off analog power supply.
 // Clear the Watch Dog Timer.
 // Turn on indicator LED1.
 // Turn on indicator LED2.
