
Architectural overview
UM0404
36/564
DocID13284 Rev 2
The core timers T3 and T6 have output toggle latches (TxOTL) which change their state on
each timer overflow / underflow. The state of these latches may be output on port pins
(TxOUT) or may be used internally to concatenate the core timers with the respective
auxiliary timers resulting in 32/33-bit timers/counters for measuring long time periods with
high resolution.
Various reload or capture functions can be selected to reload timers or capture a timer’s
contents triggered by an external signal or a selectable transition of toggle latch TxOTL.
1.4.7 Watchdog
timer
The Watchdog Timer is a fail-safe mechanism. It limits the maximum malfunction time of the
controller.
The Watchdog Timer is always enabled after a reset of the chip, and can only be disabled in
the time interval until the EINIT (end of initialization) instruction has been executed. In this
way the chip’s start-up procedure is always monitored. The software must be designed to
service the Watchdog Timer before it overflows. If, due to hardware or software related
failures, the software fails to do so, the Watchdog Timer overflows and generates an internal
hardware reset and pulls the RSTOUT pin low in order to allow external hardware
components to be reset.
The Watchdog Timer is a 16-bit timer, clocked with the system clock divided either by 2 or by
128. The high byte of the watchdog Timer register can be set to a pre-specified reload value
(stored in WDTREL) in order to allow further variation of the monitored time interval. Each
time it is serviced by the application software, the high byte of the Watchdog Timer is
reloaded.
1.4.8
Capture / compare (CAPCOM) units
The two CAPCOM units support generation and control of timing sequences on up to 32
channels. The CAPCOM units are typically used to handle high speed I/O tasks such as
pulse and waveform generation, pulse width modulation (PWM), Digital to Analog (D/A)
conversion, software timing, or time recording relative to external events.
Four 16-bit timers (T0/T1, T7/T8) with reload registers, provide two independent time bases
for the capture/compare register array.
The input clock for the timers is programmable to several pre-scaled values of the internal
system clock, or may be derived from an overflow/underflow of timer T6 in module GPT2.
This provides a wide range of variation for the timer period and resolution and allows
precise adjustments to the application specific requirements. In addition, external count
inputs for CAPCOM timers T0 and T7 allow event scheduling for the capture/compare
registers relative to external events.
Both of the two capture/compare register arrays contain 16 dual purpose capture/compare
registers, each of which may be individually allocated to either CAPCOM timer T0 or T1 (T7
or T8, respectively), and programmed for capture or compare function.
Each register has one port pin associated with it which is an input pin for triggering the
capture function, or is an output pin (except for CC24...CC27) to indicate the occurrence of
a compare event.
When a capture/compare register has been selected for capture mode, the current contents
of the allocated timer will be latched (captured) into the capture/compare register in
response to an external event at the port pin which is associated with this register.