PIT Timer Clock / Core Clock

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

PIT Timer Clock / Core Clock

1,106 Views
samc
Contributor III

Hello,

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,

Sam,

Labels (1)
0 Kudos
2 Replies

668 Views
samc
Contributor III

Hi,

I succeed to use the TPM on external clock. Thank you.

Best Regards,

0 Kudos

668 Views
mjbcswitzerland
Specialist V

Hi

The PIT is clocked only by the bus clock. You can however use the TPM as periodic timer, clocked from the 12MHz external clock.

Regards

Mark

Professional support for Kinetis: http://www.utasker.com/index.html
Remote desktop one-on-one coaching: http://www.utasker.com/services.html
Getting started to expert videos: https://www.youtube.com/results?search_query=utasker+shorts

0 Kudos