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