Timer and counters are essential in CPU applications. Used to count events, measure time intervals or frequencies, or generate periodic timing events.
The TIMERmodule provides two independent 16-bit timers each with its own 16-bit pre-scaler. An additional pre-scaler is provided for applications where external high frequency events or clocks control the operation. The two timers can be locked for measurements over a given time span. Timer B provides the observation window while Timer A is counting events.
The operating mode of each timer can be selected independently:
- Free running: Timer is reloaded with initial value after counter reaches zero
- One-shot: Timer stops after reaching terminal count
- Window mode: Timer A counts while Timer B generates observation window
Each timer generates an interrupt upon arriving at terminal count zero. A count capture command is available to sample the current count state without interrupting the timer.