9 Replies Latest reply on Dec 10, 2018 4:27 AM by JaSi_1632926

    No interrupts on M0+ core (PSoC 62)

    JaSi_1632926

      Hi,

      I'm unable to get interrupts to trigger correctly in the M0+ core. The same interrupt works as expected on the M4 core - but it doesn't trigger on the M0+ core.

       

      However, if I debug using MiniProg3 and PsoC Creator, once I add a breakpoint somewhere in the interrupt handler or the main loop, the interrupt is triggered as expected. How does the breakpoints affect interrupts, and how can it make it 'work'?

       

      This is more or less the code:

       

      static int counter = 0;

      static void IrqHandler() {

          NVIC_ClearPendingIRQ(IRQ_cfg.intrSrc);

          counter++;

      }

      __enable_irq();

      Cy_SysInt_Init(&IRQ_cfg, &IrqHandler);

      NVIC_EnableIRQ(IRQ_cfg.intrSrc);

       

      Reading the counter variable while debugging proves what I've written above - it only increments when I have added a breakpoint.

       

      I don't understand this.

       

      Thanks, Jacob