AnsweredAssumed Answered

How to reset GP timer counter value

Question asked by robin.hu Employee on Jan 17, 2011
Latest reply on Jan 17, 2011 by Julien

use GP timer working in PWM output mode to synchrounize an external timing source, but found that once the GP timer started, there is no way to reset the counter value to 0 or 1.

 

Stop the GP timer immediately(set TIMDIS0 in TIMER_DISABLE & clear TRUN0 bit in TIMER_STATUS regster), the GP timer did stopped, but if re-enable the GP timer, it resume increasing COUNTER value. 

 

Is there any method to work out?

 

--------------------

//* Stop Running immediately
        //* Timer Disable Register
        *pTIMER_DISABLE |= TIMDIS0;
        //* Timer Status Register
        *pTIMER_STATUS &= (~TRUN0);

 

//* Re Enable TIMER in PWM mode
        //* Timer Enable Register
        *pTIMER_ENABLE |= TIMEN0;

--------------------

Outcomes