LOCKUP Reset Issues and PIT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LOCKUP Reset Issues and PIT

ソリューションへジャンプ
1,957件の閲覧回数
lsrbigfoot
Contributor IV

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?

ラベル(1)
0 件の賞賛
返信
1 解決策
1,631件の閲覧回数
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

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,632件の閲覧回数
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

0 件の賞賛
返信
1,631件の閲覧回数
lsrbigfoot
Contributor IV

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 件の賞賛
返信
1,631件の閲覧回数
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 件の賞賛
返信