KDS PIT Timer issue when using 3 PIT timers on K64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KDS PIT Timer issue when using 3 PIT timers on K64

1,351 Views
johnbaker
Contributor IV

I have been using PIT1 and PIT2 for a long time now and they have been working correctly (1000ms and 14ms respectively)

When I added a 3rd PIT timer to fire each 100us the interrupts from all 3 PIT timer doubled.  PIT1 started running at 500us and PIT3 at 50us.

Is there a limit to the number of PIT timers one can use at the same time?

Whats even stranger is that when I added a GPIO pin to toggle within the interrupt and monitored it on a scope it fired correctly.  When I comment the one line back out it goes wacky again.

void PIT3_IRQHandler(void){

       NVIC_ClearPendingIRQ(PIT3_IRQn);

       usCounter++;

       //GPIOD_PTOR |= (1 << 4);

       PIT_TFLG3 = 1;   //To reset timer set PIT_TFLG3 to 1.

}

Another factor to consider is that I am using SPI Slave with DMA.

Thanks,

John Baker

Tags (4)
0 Kudos
Reply
1 Reply

924 Views
EarlOrlando
Senior Contributor II

Hello John,

You can use all the PITs at the same time.

Could you please specify which IDE are you using and share your configurations to reproduce the same problem please?

Regards,

Earl.

0 Kudos
Reply