AnsweredAssumed Answered

MKE04

Question asked by Muralidhar M on Feb 14, 2020
Latest reply on Feb 17, 2020 by Alexis Andalon

We are using Periodic Interrupt Timer in MKE04Z8VTG4 controller. While using PIT, facing a problem like, generating interrupt without reaching count to zero. Initializations are provided below:

 void pit_init()
{

CLOCK_EnableClock(kCLOCK_Pit0);
PIT->MCR = 0x01; // Enable clock for PIT
PIT->CHANNEL[0].LDVAL = 0x0003A9A6;

PIT->CHANNEL[0].TCTRL = 0x03; // Start Timer & Interrupt Enable
NVIC_EnableIRQ(PIT_CH0_IRQn);
NVIC_SetPriority(PIT_CH0_IRQn,0);

}

Outcomes