Is it possible to reset Timer Capture value?

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

Is it possible to reset Timer Capture value?

744 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by loukys on Tue Jan 07 08:53:38 MST 2014
Hi
Is it possible to reset Timer Capture value (TMR32B1CR0 precisely)? It is marked as read-only and there is no control bits to reset the value. I do not want to have interrupt and as a result can't use the interrupt flag.
My "desired" code is:
.....................
    cr0store=TMR32B1CR0;
    TMR32B1CR0=0;
............................

I am trying to read the register at regular intervals and check if it was updated or not and read the captured value. It is possible that two consequative values are the same and I am not able to use compare to find out if the new capture happened.
Any ideas are welcome.

Thanks
Labels (1)
0 Kudos
4 Replies

699 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Wed Feb 05 16:07:17 MST 2014
That is odd!

You don't use the timer's ISR for exactly the same purpose as the external pin interrupt!

What's so wrong with looking into the timer's IR register to see if a capture happened (and then clear it)?
Why not have another interrupt because of the capture besides the interrupt because of the match?
0 Kudos

699 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by loukys on Fri Jan 10 05:15:26 MST 2014
Thank you for reply - have to enable match on the same timer, so masking in NVIC is not possible. So far I wired Capture input to another pin as well and am looking for external pin interrupt to happen.
0 Kudos

699 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Fri Jan 10 04:12:07 MST 2014

Quote: loukys
Any suggestions at all?



You could try using the interrupt logic without enabling the interrupt in the NVIC.
0 Kudos

699 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by loukys on Fri Jan 10 02:27:44 MST 2014
Any suggestions at all? If anybody thinks that it is not possible - please say so - I will count votes :)
0 Kudos