AnsweredAssumed Answered

MK02FN64VFM10 PIT (and interrupts >63) not working

Question asked by Patrick Degry on Aug 27, 2015
Latest reply on Aug 31, 2015 by Mark Butcher

I have a MK02FN128VLH10: I have trouble to get the PIT1 generating interrupts. (KDS3.0 with KSDK1.2.)

Also PIT0,2,3 are not working.

PIT clock is enabled. Global interrupts are enabled.

PIT is running and interrupt flag TIF set in TFLG1.

Systemcontol - ICSR - VECTACTIVE = 0x41 (indicating vector 65 = PIT1).

Registers Primask = 0; So interrupts are not blocked.

At the correct vector table position: I see the address of the handler. If I dissassemble at this address, I see the correct handler code.

But the processor is not jumping to the handler!

 

Then I tried to invoke a software interrupt:

  enable_irq (PIT1_IRQn);

  EnableInterrupts;

  NVIC->STIR = PIT1_IRQn;

It is not jumping to the handler PIT1_IRQHandler().

 

However, with the above code, if I take any interrupt number < 63, the software interrupt works!

  enable_irq (UART0_RX_TX_IRQn);

  EnableInterrupts;

  NVIC->STIR = UART0_RX_TX_IRQn;

Then it jumps to UART0_RX_TX_IRQHandler().

 

Or even:

  enable_irq (Reserved53_IRQ);

  EnableInterrupts;

  NVIC->STIR = Reserved53_IRQ;

Then it jumps to Reserved53_IRQHandler().

 

Bad luck: the PIT starts at 64...

Test:

  enable_irq (Reserved71_IRQ);

  EnableInterrupts;

  NVIC->STIR = Reserved71_IRQ;

It does NOT jump to Reserved71_IRQHandler().

 

I get a default interrupt or nothing happens.

 

Any idea?

 

patrick

 

Outcomes