yokel
Junior Member level 3
Dear All,
I am a newbie. I am using dsPIC30F3011 interrupts. Problem is, say I have activated the ISR of int0 only, but that ISR of int0 always gets activated if I input (no matter 0 or 1) something in any other interrupts pins or some other pins of the MCU which has no relation with interrupt. Even the ISR is called if I touch those pins with any metal in stead of any 1/0 input.
This is the code I am using-
void InitINT(void)
{
INTCON2=0x0001; //the result is same whether I set 1 or 0 here
//External Interrupt 0
IEC0bits.INT0IE=1; //enable INT0 ISR
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
IPC0bits.INT0IP = 4; // interrupt priority
return;
}
void __attribute__((interrupt, no_auto_psv)) _INT0Interrupt(void)
{
SendData('e'); // Send this to PC
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
}
Please tell me all the possible reasons (in both firmware and hardware parts) behind it so that I can troubleshoot
with thanks,
I am a newbie. I am using dsPIC30F3011 interrupts. Problem is, say I have activated the ISR of int0 only, but that ISR of int0 always gets activated if I input (no matter 0 or 1) something in any other interrupts pins or some other pins of the MCU which has no relation with interrupt. Even the ISR is called if I touch those pins with any metal in stead of any 1/0 input.
This is the code I am using-
void InitINT(void)
{
INTCON2=0x0001; //the result is same whether I set 1 or 0 here
//External Interrupt 0
IEC0bits.INT0IE=1; //enable INT0 ISR
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
IPC0bits.INT0IP = 4; // interrupt priority
return;
}
void __attribute__((interrupt, no_auto_psv)) _INT0Interrupt(void)
{
SendData('e'); // Send this to PC
IFS0bits.INT0IF=0; //clear INT0 interrupt flag
}
Please tell me all the possible reasons (in both firmware and hardware parts) behind it so that I can troubleshoot
with thanks,