Capture Mode Functionality; Compare Mode Functionality; Prescaler Functionality - Texas Instruments OMAP5912 Reference Manual

Multimedia processor device overview and architecture
Hide thumbs Also See for OMAP5912:
Table of Contents

Advertisement

Dual-Mode Timer
4.3

Capture Mode Functionality

4.4

Compare Mode Functionality

4.5

Prescaler Functionality

34
Timers
The timer value in TCRR can be captured and saved in TCAR when a
transition is detected on the module input pin (event capture).
Rising edge, falling edge, or both can be selected in TCLR (TCM) to trigger the
timer counter capture. The module sets the TISR (TCAR_IT_FLAG bit) when
an active edge is detected; at the same time the counter value TCRR is stored
in the timer capture register TCAR. If there are several consecutive capture
events, the first one is saved in TCAR.
The edge detection logic is reset when either the TCAR_IT_FLAG is cleared
by writing a 1 to it, or when the TCM bits in the TCLR register transition from
the no-capture mode detection to any other mode. The timer functional clock
(input to prescaler) is used to sample the input pin (event capture). Input
negative or positive pulses can be detected when pulse time is greater than
the functional clock period. An interrupt is issued on edge detection if the
capture interrupt enable bit is set in the timer interrupt enable register TIER
(TCAR_IT_ENA bit).
When the compare enable TCLR (CE bit) is set to 1, the timer value (TCRR)
is continuously compared to the value held in the timer match register (TMAR).
TMAR value can be loaded at any time (timer counting or stopped). When the
TCRR and the TMAR values match, an interrupt is issued if the TIER
(MAT_IT_ENA bit) is set.
The dedicated output pin (timer PWM) can be programmed through TCLR
(TRG and PT bits) to generate one positive pulse (timer clock duration) or to
invert the current value (toggle mode) when an overflow and a match occur.
A prescaler can be used to divide the timer counter input clock frequency. The
prescaler is enabled when TCLR bit 5 is set (PRE). The 2
(PTV) can be configured in the TCLR register.
The prescaler counter is reset when the timer counter is stopped or reloaded
on the fly.
Table 29 lists the prescaler/timer reload values versus contexts.
n
division ratio value
SPRU759B

Advertisement

Table of Contents
loading

Table of Contents