Timer Issue

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

Timer Issue

2,125件の閲覧回数
shaileshagrahar
Contributor III

Hi,

I have written a code for LPTMR0 for 1 second interrupt .i have attached the code .My issue is:

1: My LPTMR0_IRQ_Handler() is running very fast not as expected on every second.

2: During debugging my code i am not getting NCR value being increment it is constant and remaining 0.

3: I varying my MCR value 450000, 4700000, 7000000,15000000 and so on but there is no effect on occurrence timer interrupt, it is still very fast an all above value used fro MCR.

 

Please help me on this .

can you please give some exposure on , this TFC bit,i am little bit confuse on this-

When clear, TFC configures the CNR to reset whenever TCF is set. When set, TFC configures the CNR
to reset on overflow. TFC must be altered only when the LPTMR is disabled.

.

Original Attachment has been moved to: LPTMR0.c.zip

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

1,904件の閲覧回数
shaileshagrahar
Contributor III

HI,

I have resolved my issue .

Thanks!

0 件の賞賛
返信

1,904件の閲覧回数
shaileshagrahar
Contributor III

 PCC->PCC_LPIT0  = PCC_PCC_PCS(6);

0 件の賞賛
返信