AnsweredAssumed Answered

MPC5746C breakpoint in the Interrupt Service Routine

Question asked by Christopher Holland on Apr 25, 2018
Latest reply on Apr 26, 2018 by Christopher Holland

Hi,

 

I have some strange happenings going on.

When I enable a breakpoint in an ISR, the code immediately stops at the breakpoint.

It doesn't seem to be caused by the code, but only because of the breakpoint being set.

I set the breakpoint at random times. Like 3,4,5,6,7 minutes in and it's the same.

Somehow enabling a breakpoint is causing the ISR to be called?

 

I have a GPIO pin I enable for an interrupt.

SIUL2.MSCR[PC4].R = 0u;

SIUL2.MSCR[PC4].B.IBE = 1u;

SIUL2.IMCR[674-512].B.SSS = 1u;

 

SIUL2.IFEER0.B.IFEE18 = 1u; /*falling edge event enabled (As per HITS Active Level = Low) */

/* SIUL2.IFER0.B.IFE18 = 1u; */ /*enable interrupt filter */

SIUL2.IRER0.B.EIRE18 = 1u; /*enable interrupt */

 

void SIUL_EIRQ_C(void)

{

   if(SIUL2.ISR0.B.EIF18) /* TP 394 */

   {

   /* Clear IRQ 18 */

   SIUL2.ISR0.B.EIF18 = 1;   <-- When I enable breakpoint here, the code stops immediately

   WDTC++;                           <-- Counter is 0.

   }

}

 

 

Thanks

Outcomes