
S3C3410X RISC MICROPROCESSOR
TIMER
8-5
8-BIT TIMER (TIMER3 AND TIMER4)
Interval Mode Operation
In interval mode, a match signal should be generated when the counter value is identical to the value written to
the timer data register, TDAT3 and TDAT4. The match signal can generate a timer match interrupt and clear the
counter value. When a match condition happens, the timer output(TOUT3/4) will be toggled.
Capture Mode Operation
In capture mode, the timer can perform the capturing operation, which is that the counter value is transferred into
the capture register(Timer Data Register) in synchronization with an external trigger. The external triggering
signal for capturing operation is a pre-defined valid edge on the capture input pin. When this valid signal
happens, the counter value in process should be moved into the capture register(Timer Data Register). By using
the capturing function, users can measure the time difference between external events. If a valid trigger signal on
the pin does not happen before the overflow, an overflow interrupt will be generated and the counter value will be
counted from 00h, again.
PWM Mode Operation
The timer can be used for generating the PWM(Pulse Width Modulation) signal. Timer3/4 can support the PWM
functionality, which is different from Timer0/1/2.
In this mode, a match signal should be generated when the counter value is identical to the written to the timer
FIFO register(Timer Data Register). However, because the match signal dose not clear the counter, it can
generate an overflow interrupt when the counter value reaches to the ffh. After the overflow of counter value, the
timer will count its value from 00h, again. To generate the PWM signal, the PWM output should be "Low" level as
long as the counter value is less than or equal(
≤) to the value specified in Timer Buffer Register and "High" level
as long as the counter value is greater than (>) the value specified in Timer Buffer Register. Because it is 8-bit
PWM timer, the one period is equal to tCLK
× 256.
The pre-scale value can define the input clock frequency of Timer according to the following equation:
Timer input clock frequency(tCLK) = MCLK / (pre-scale value + 1) : for Timer 0, 1 and 2
Timer input clock frequency(tCLK) = MCLK / (pre-scale value +1) / (divider value) : for Timer 3 and 4
pre-scale value = 0 – 255, divider value = 2, 4, 8, 16
DMA Mode Operation (Timer 3 Only)
Users can use the DMA to support the Timer 1. The DMA can transfer the data in memory to the TDAT3(Timer
Data Register). When the match interrupt happens, the Timer 1 can request the DMA service to transfer the data
into the TDAT3 register, again. Before the DMA-based operation, users should configure the control information
on DMA, such as TCON3[5:3] to "010", TDAT3, destination address, source address, and so on. This kind of
DMA-based timer operation is very helpful to generate the pre-defined timing event or the sound using PWM.