AnsweredAssumed Answered

PIT Timer Clock / Core Clock

Question asked by Samuel Conti on Mar 2, 2017
Latest reply on Mar 8, 2017 by Samuel Conti



I need precision about clock working on PIT Timer (I use MKL17Z256 programmed with KDS and Processor Expert). There's a 12Mhz quartz on my board.

In the clock manager of processor expert, in the MCG Lite Settings, I selected HIRC for the MCG mode then I have a 48Mhz core clock. I use a PIT Timer to generate an interrupt every 1ms, PIT Timer seems to be clocked by the MCG output (so 48MHz internal ref) but this clock isn't enough precise for my application (loss of 17s on 10mn, it's too important).

I try to use the 12Mhz external quartz for the MCG output, I have a better precision (loss of 90ms on 10mn, it's acceptable) but now the core clock is at 12Mhz and it's too slow to execute my program in the good timing.


So my questions are :


- Is there a possibility to have a periodic interrupt clocked on external quartz to have a good precision and core clocked on HIRC 48MHz to have a high frequency execution of my program ?


Best Regards,