
SN32F260 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 59
Version 1.5
6
6
6
16-BIT TIMER0 WITH CAPTURE
FUNCTION
6.1 OVERVIEW
Each Counter/timer is designed to count cycles of the peripheral clock (PCLK) or an externally supplied clock and can
optionally generate interrupts or perform other actions at specified timer values based on four match registers. Each
counter/timer also includes one capture input to trap the timer value when an input signal transitions, optionally
generating an interrupt.
In PWM mode, up to 23 match and 1 global registers can be used to provide a single-edge controlled PWM output on
the match output pins.
6.2 FEATURES
Two 16-bit counter/timers with a programmable 8-bit prescaler.
Counter or timer operation
Two 16-bit capture channels that can take a snapshot of the timer value when an input signal transitions. A
capture event may also optionally generate an interrupt.
The timer and prescaler may be configured to be cleared on a designated capture event. This feature permits
easy pulse-width measurement by clearing the timer on the leading edge of an input pulse and capturing the timer
value on the trailing edge.
Four 16-bit match registers that allow:
–
Continuous operation with optional interrupt generation on match.
–
Stop timer on match with optional interrupt generation.
–
Reset timer on match with optional interrupt generation.
Up to 22(CT16B1) PWM outputs corresponding to match registers with the following capabilities:
–
Set LOW on match.
–
Set HIGH on match.
–
Toggle on match.
–
Do nothing on match.
6.3 PIN DESCRIPTION
Pin Name
Type
Description
GPIO Configuration
CT16Bn_CAP0
I
Capture channel input 0.
Depends on GPIOn_CFG
CT16Bn_PWMx
O
Output channel x of Match/PWM output.