Systick ISR not running [RA4M1]

I have a project where the Systick ISR  stops running. It works at the beginning of the program, then stops after a few seconds.

I looked in the ICSR register and found:
VectPending = 0x10

ISRPending = 1

PendStSet = 1

This is the ISR code:

void SysTick_Handler(void)

{

int i;

if (Function == CONTROL)

i = 3199;

else

i = 9;

SampleCounter++;

if (SampleCounter > i)

SampleCounter = 0;

ProgFlag = true;

}

The rest of the program executes a WFI until ProgFlag is true, then proceeds with the rest of the routine, which clears ProgFlag when it is finished.

Any clues?

Parents
  • Hello,

    Is Systick timer still running ?

    Have you changed the default Systick interrupt priority ? Maybe another IRQ is blocking the Systick timer interrupt.

  • Timer is running. Program is in its main WFI loop. The flag on bit 16 has been set, so I know that is has reached zero.

    I haven’t deliberately changed the priority, but where do I check what the priority is? And what the priority threshold level is set to?

    I don’t remember there being any flag that needs to be reset when executing the ISR.Is that correct?

Reply
  • Timer is running. Program is in its main WFI loop. The flag on bit 16 has been set, so I know that is has reached zero.

    I haven’t deliberately changed the priority, but where do I check what the priority is? And what the priority threshold level is set to?

    I don’t remember there being any flag that needs to be reset when executing the ISR.Is that correct?

Children