62 #include <peripheral/system.h>
85 static unsigned int cp0_exception_cause;
86 static unsigned int cp0_exception_epc;
97 DDPCONbits.JTAGEN = 0;
100 asm volatile(
"mfc0 %0,$13" :
"=r"(r));
102 asm volatile(
"mtc0 %0,$13" :
"+r"(r));
104 INTCONSET = _INTCON_MVEC_MASK;
111 OSCCONCLR = 1 << _OSCCON_SLPEN_POSITION;
121 _general_exception_handler(
void)
123 asm volatile (
"mfc0 %0,$14":
"=r" (cp0_exception_epc));
125 asm volatile (
"mfc0 %0,$13":
"=r" (cp0_exception_cause));
127 cp0_exception_code = (cp0_exception_cause >> 2) & 0x0000001F;
INTERRUPT interface for PIC32MX (pic32mx795f512l)