Timer Issue

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Issue

324 Views
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

Labels (1)
0 Kudos
2 Replies

103 Views
shaileshagrahar
Contributor III

HI,

I have resolved my issue .

Thanks!

0 Kudos

103 Views
shaileshagrahar
Contributor III

 PCC->PCC_LPIT0  = PCC_PCC_PCS(6);

0 Kudos