SPRUJF2A March 2026 – March 2026 AM13E23019
The Up/Down counting mode can count in an down-up direction or an up-down direction depending on TIMx.CTRCTL.CVAE value. The TIMx.CTRCTL.CVAE bits specify the initialization condition of the counter.
| TIMx.CTRCTL.CVAE Value | Counter Value After Enable |
|---|---|
| 0x0 | Load Value (down-up direction) |
| 0x1 | No Change |
| 0x2 | Zero (up-down direction) |
When TIMx.CTRCTL.CVAE = 0, TIMx.CTR is set to TIMx.LOAD register value and TIMx counts in the down direction. When it reaches zero, a Zero event is generated and TIMx counts back up to TIMx.LOAD value. A Load event is generated when it reaches TIMx.LOAD value.
Down-up Counting Mode and Event Generation, CVAE = 0 shows TIMx counting in the down-up direction when TIMx.CTRCTL.CVAE = 0.
When TIMx.CTRCTL.CVAE = 2, TIMx.CTR is set to zero and TIMx counts in the up direction. When it reaches TIMx.LOAD, a Load event is generated and TIMx counts back down to zero. A Zero event is generated when it reaches zero.
Up-down Counting Mode and Event Generation, CVAE = 2 shows TIMx counting in up-down direction when TIMx.CTRCTL.CVAE = 2.