LOCKUP Reset Issues and PIT

cancel
Showing results for 
Search instead for 
Did you mean: 

LOCKUP Reset Issues and PIT

Jump to solution
501 Views
lsrbigfoot
Contributor III

I was hoping that I could use the Periodic Timers PIT0 (with interrupts) and PIT1 as my system timers.

I tried using the example PIT code for the K20, but for some reason, I experience a LOCKUP reset, whenever I write to the periodic timer MCR (PIT_MCR). Setting it to 0 or FRZ will cause a LOCKUP reset, whenever I step into the next statement

Any Ideas as to why this will happen?

Labels (1)
0 Kudos
1 Solution
175 Views
mjbcswitzerland
Specialist V

Hi

Do you power up the PIT module before using it?

POWER_UP(6, SIM_SCGC6_PIT);

i.e.

SIM_SCGC6 |= SIM_SCGC6_PIT;

or SIM_SCGC6 |= 0x00800000;

Regards

Mark

View solution in original post

0 Kudos
3 Replies
176 Views
mjbcswitzerland
Specialist V

Hi

Do you power up the PIT module before using it?

POWER_UP(6, SIM_SCGC6_PIT);

i.e.

SIM_SCGC6 |= SIM_SCGC6_PIT;

or SIM_SCGC6 |= 0x00800000;

Regards

Mark

View solution in original post

0 Kudos
175 Views
lsrbigfoot
Contributor III

Thanks Mark. It's good to know that there is a power enable bit for the PIT peripheral ... I was going off the PIT example in K20P144M100SF2V2RM which didn't seem to indicate the use of this bit.

0 Kudos
175 Views
mjbcswitzerland
Specialist V

Hi

For your reference I have a link to HW timer support in the uTasker project which support the K and KL devices:

- PITs (K and KL) - single-shot and periodic interrupts

- FlexTimers (K) - single-shot and periodic interrupts or PWM

- TPM (KL) - single-shot and periodic interrups or PWM

The modules are powered up automatically when used and automatically powered down (when possible) when none of their channels are required further.

http://www.utasker.com/docs/uTasker/uTaskerHWTimers.PDF

All timers are simulated in the uTasker simulator.

Regards

Mark

http://www.utasker.com/kinetis.html

0 Kudos