Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED]PIC32 MIPS and Interrupt do not work together
29-03-2014, 07:30 PM,
#11
RE: [SOLVED]PIC32 MIPS and Interrupt do not work together
Hi

Is VERY IMPORTANT the definition order, your code is correct but the order is wrong.

this code is compiled correctly.

Code:
void __attribute__ ((nomips16)) ISR_wrapper_vector_19(void) __attribute__ ((section (".vector_19")));

void __attribute__ ((nomips16)) Int4Interrupt(void) __attribute__ ((interrupt));

void __attribute__ ((nomips16)) ISR_wrapper_vector_19(void) { Int4Interrupt(); }

void __attribute__ ((nomips16)) Int4Interrupt(void) // interrupt treatment
{
if (IFS0bits.INT4IF) // interrupt flag for INT4
{
//wus.bits.ring = 1;
IFS0bits.INT4IF=0; // clear the interrupt flag
IEC0bits.INT4IE=0; // Interrupt disabled
}
}


Bye Bye, Moreno
Reply
30-03-2014, 08:28 PM, (This post was last modified: 30-03-2014, 08:28 PM by robyltr.)
#12
RE: [SOLVED]PIC32 MIPS and Interrupt do not work together
(29-03-2014, 07:30 PM)moreno Wrote: Hi

Is VERY IMPORTANT the definition order, your code is correct but the order is wrong.

this code is compiled correctly.

Code:
void __attribute__ ((nomips16)) ISR_wrapper_vector_19(void) __attribute__ ((section (".vector_19")));

void __attribute__ ((nomips16)) Int4Interrupt(void) __attribute__ ((interrupt));

void __attribute__ ((nomips16)) ISR_wrapper_vector_19(void) { Int4Interrupt(); }

void __attribute__ ((nomips16)) Int4Interrupt(void) // interrupt treatment
{
if (IFS0bits.INT4IF) // interrupt flag for INT4
{
//wus.bits.ring = 1;
IFS0bits.INT4IF=0; // clear the interrupt flag
IEC0bits.INT4IE=0; // Interrupt disabled
}
}


Bye Bye, Moreno

Thanks
Reply
15-12-2015, 11:57 AM,
#13
Wink  RE: [SOLVED]PIC32 MIPS and Interrupt do not work together

.pde   ShieldEkgEmgDemoWithPIC32-PINGUINO-OTG_MX220byYM.pde (Size: 9.21 KB / Downloads: 5)
(29-03-2014, 05:58 PM)Thanks, Moreno. Wrote: I have almost same problem at using EKG-EMG shield, but I can fix it by your two advices.
Thanks in advances! 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)