• AVR Freaks

AnsweredHot!Interrupts never occur on PIC32MX350

Author
Elmi79
Starting Member
  • Total Posts : 35
  • Reward points : 0
  • Joined: 2017/03/05 08:07:13
  • Location: 0
  • Status: offline
2020/02/24 00:10:50 (permalink)
0

Interrupts never occur on PIC32MX350

Hi,
 
I have a problem with the external interrupts. In my hardware a clock-signal is applied to inputs D8 and D9 and I'm using INT1 and INT2 with these lines. This is because I want to get an interrupt on both, the falling and the rising edge. The whole stuff is configured via MCC. The calls to my functions have been added to the ISRs in ext_int.c and the interrupts are enabled via
EX_INT1_InterruptFlagClear(); 
EX_INT1_PositiveEdgeSet();
EX_INT1_InterruptEnable();
EX_INT2_InterruptFlagClear();
EX_INT2_NegativeEdgeSet();
EX_INT2_InterruptEnable();

Nevertheless my interrupt never happens, neither a breakpoint is reached within the related function nor the functionality itself is triggered. 
 
So my question: what could be missing here?
 
Thanks!
#1
jg_ee
Super Member
  • Total Posts : 192
  • Reward points : 0
  • Joined: 2015/04/30 10:54:52
  • Location: Colorado
  • Status: offline
Re: Interrupts never occur on PIC32MX350 2020/02/24 10:14:52 (permalink)
0
Do you have any interrupts working?
#2
NKurzman
A Guy on the Net
  • Total Posts : 18402
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Interrupts never occur on PIC32MX350 2020/02/24 12:34:52 (permalink)
0
Did you enable the interrupts?
DO you have an ISR for INT1?
#3
Elmi79
Starting Member
  • Total Posts : 35
  • Reward points : 0
  • Joined: 2017/03/05 08:07:13
  • Location: 0
  • Status: offline
Re: Interrupts never occur on PIC32MX350 2020/02/25 00:59:36 (permalink)
0
NKurzman
Did you enable the interrupts?

 
Yes: 
EX_INT1_InterruptEnable();
EX_INT2_InterruptEnable();

 
NKurzman
DO you have an ISR for INT1?

 
Yes, they are MCC-generated and call my function CLKIsr:
//***User Area Begin->code: Add External Interrupt handler specific headers 
extern void __longramfunc__ CLKIsr(void);
/***User Area End->code: Add External Interrupt handler specific headers

/**
   Section: External Interrupt Handlers
 */
/**
  Interrupt Handler for EX_INT1 - INT1
*/
void __ISR(_EXTERNAL_1_VECTOR, IPL1AUTO) _EXTERNAL_1(void)
{
    //***User Area Begin->code: External Interrupt 1***
    CLKIsr();
    //***User Area End->code: External Interrupt 1***
    EX_INT1_InterruptFlagClear();
}
/**
  Interrupt Handler for EX_INT2 - INT2
*/
void __ISR(_EXTERNAL_2_VECTOR, IPL1AUTO) _EXTERNAL_2(void)
{
    //***User Area Begin->code: External Interrupt 2***
    CLKIsr();
    //***User Area End->code: External Interrupt 2***
    EX_INT1_InterruptFlagClear();
}

 
#4
andersm
Super Member
  • Total Posts : 2774
  • Reward points : 0
  • Joined: 2012/10/07 14:57:44
  • Location: 0
  • Status: online
Re: Interrupts never occur on PIC32MX350 2020/02/25 06:50:28 (permalink) ☼ Best Answerby Elmi79 2020/02/26 01:16:51
5 (2)
Have you enabled the master interrupt enable?
#5
WaltR
Super Member
  • Total Posts : 3799
  • Reward points : 0
  • Joined: 2003/11/07 12:38:21
  • Status: offline
Re: Interrupts never occur on PIC32MX350 2020/02/26 07:32:22 (permalink)
0
did you MAP the INT pins in the PPS registers?
#6
Jump to:
© 2020 APG vNext Commercial Version 4.5