Hello Everyone. I need a support to clear TCNT register to 0.
While control comes from boot to App, I need clear TCNT register to 0.
I aware that , TNCT can't be cleared in normal mode. From google, i understand that below 2 are methods available.
Method 1: Using Timer Channel 7 (Hardware Reset) : As I want to clear TCNT only once, I didn’t try this method.
Method 2: System/Module Reset (Force Clear) : I have tried this way .
- Clear the TEN bit (Timer Enable) in the TSCR1 (Timer System Control Register 1) to turn off the timer. TSCR1_TEN =0;
- Set the TEN bit to re-enable it (TSCR1_TEN =1 ;). This should clear TCNT to 0000.
But this method is not working . Please help me out to solve this issue