1.4 One-Shot and Limit Modes
The UTMR module contains two different modes that can be applied on top of the selected Start, Reset, and Stop conditions – One-Shot and Limit modes.
The One-Shot mode is selected by setting the OSEN bit. When One-Shot mode is
active, a Stop condition will stop a running timer and clear the ON bit, even if it
coincides with a Start condition. This disables the timer module and prevents it from
being restarted again (unless the user turns the timer on again). When ON =
1
and the timer is not running (RUN = 0
), if a
stop event occurs prior to the start, the ON bit is not cleared.
The Limit mode is selected by setting the LIMIT bit, and is relevant only
when RESET = None and counter equals PR value. Limit mode prevents the counter value in
TUxyTMR timer register from exceeding the period value in TUxyPR period register. In the
clocks following the PR match condition, while the timer remains in a Run state (RUN =
1
), the counter value is held at PR and does not advance to PR+1.
Any subsequent Start conditions will not have any effect on the counter value, unless
the counter is reset.
Both the One-Shot and Limit modes have effects exclusive of one another and can be used together in an application.