NuMicro® NUC029LEE/NUC029SEE32-bit Arm® Cortex® -M0 MicrocontrollerAug, 2018 Page 237 of 497 Rev 1.00NUMICRO® NUC029LEE/NUC029SEE TECHNICAL REFERENCE MANUAL6.8.5.5 Continuous Counting ModeIf timer controller is configured at continuous counting mode (TCSR[28:27] is 11) and CEN bit isset, the timer counter starts up counting. Once the TDR value reaches TCMP value, the TIF flagwill be set to 1 and TDR value keeps up counting. In the meantime, if the IE bit is enabled, thetimer interrupt signal is generated and sent to NVIC to inform CPU also. User can changedifferent TCMP value immediately without disabling timer counting and restarting timer counting inthis mode.For example, TCMP value is set as 80, first. The TIF flag will set to 1 when TDR value is equal to80, timer counter is kept counting and TDR value will not goes back to 0, it continues to count 81,82, 83,˙˙˙ to 224 -1, 0, 1, 2, 3, ˙˙˙ to 224 -1 again and again. Next, if software programs TCMPvalue as 200 and clears TIF flag, the TIF flag will set to 1 again when TDR value reaches to 200.At last, software programs TCMP as 500 and clears TIF flag, the TIF flag will set to 1 again whenTDR value reaches to 500.In this mode, the timer counting is continuous. So, this operation mode is called as continuouscounting mode.TDR = 0SetTCMPR = 80TIF = 1 andInterruptGenerationClear TIF as 0and SetTCMPR = 200TDR from 224 -1 to 0TDR = 100 TDR = 200 TDR = 300 TDR = 400 TDR = 500 TDR = 224 -1TIF = 1 andInterruptGenerationClear TIF as 0and SetTCMPR = 500TIF = 1 andInterruptGenerationClear TIF as 0and SetTCMPR = 80Figure 6.8-3 Continuous Counting Mode