The following table gives an overview of the control mode events.
Input Control Mode
Polarity
high active
(CNTCONT[14] = 0)
low active
(CNTCONT[14] = 1)
No Control Mode
-
-
Load Mode
Rising edge
Falling edge
Latch Mode
Rising edge
Falling edge
Gate Mode
High level
Low Level
Reset Mode
Rising edge
Falling edge
Table 6-6 : Input Control Mode events
6.5.3.1 No Control Mode
In this mode I/O Line 4 is ignored.
6.5.3.2 Load Mode
An event on I/O Line 4 loads the counter with the content of the Counter Preload Register.
If the 'Single Cycle' mode is active, the event on I/O Line 4 starts the counter.
The counter can also be preloaded by writing '1' to the 'Load Counter' (LCNT) bit in the Channel Command
Register.
6.5.3.3 Latch Mode
An event on I/O Line 4 latches the actual counter value in the Counter Data Register. It will remain latched until
the Counter Data Register is read or the latch is released with the CDLT bit in the Counter Status Register.
6.5.3.4 Gate Mode
The I/O Line 4 enables or disables counting.
I/O Line 4
Counter
0
Disabled
1
Enabled
Table 6-7: Gate Mode
In this mode an interrupt is generated (if enabled) if the gate is closed.
6.5.3.5 Reset Mode
An event on I/O Line 4 resets the counter.
If the 'Single Cycle' mode is active, the event on I/O Line 4 starts the counter.
The counter can also be reset by writing '1' to the Reset Counter (RCNT) bit in the Channel Command Register.
6.5.4 Configuration Examples
6.5.4.1 Watchdog Timer
The watchdog timer counts down from a programmed value until it reaches 0. The counter must be reloaded on a
regular base either internal via the Counter Command Register or external via I/O Line 4. Failure to cause a
reload would generate a timeout and an interrupt.
TPMC851 User Manual Issue 1.0.9
Page 59 of 65