Samsung S3C6400X User Manual page 1032

Table of Contents

Advertisement

S3C6400
RISC MICROPROCESSOR
TIMER OPERATION EXAMPLE
The result of the following procedure is shown in Figure 32-7.
1
TOUTn
1.
Enable the auto-reload feature. Set the TCNTBn as 160(50+110) and the TCMPBn as 110. Set the manual
update bit and inverter bit(on/off). The manual update bit sets the TCNTn,TCMPn to the value of
TCNTBn,TCMPBn.
And then, set TCNTBn,TCMPBn as 80(40+40),40 to determine the next reload value.
2.
Start Timer by setting the start bit and manual update bit off.
3.
When TCNTn has the same value with TCMPn, the logic level of TOUTn is changed from low to high
4.
When TCNTn reaches to 0, TCNTn is reloaded automatically with TCNTBn. At the same time, the interrupt
request is generated.
5.
In the ISR(interrupt service routine), the TCNTBn and TCMPBn is set as 80(20+60) and 60,which is used
for next duration.
6.
When TCNTn has the same value with TCMPn, the logic level of TOUTn is changed from low to high
7.
When TCNTn reaches to 0, TCNTn is reloaded automatically with TCNTBn. At the same time, the interrupt
request is generated.
8.
In the ISR(interrupt service routine), auto-reload and interrupt request are disabled to stop the timer.
9.
When TCNTn has the same value with TCMPn, the logic level of TOUTn is changed from low to high
10. Even when TCNTn reaches to 0, TCNTn is not any more reloaded and the timer is stopped because auto-
reload is disabled.
11. No interrupt request is generated.
2
3
50
Figure 32-7: Example of a Timer Operation
Preliminary product information describe products that are in development,
for which full characterization data and associated errata are not yet available.
Specifications and information herein are subject to change without notice.
4
6
110
40
40
5
Pulse Width Modulation Timer
7
9
10
20
60
8
11
32-9

Advertisement

Table of Contents
loading

Table of Contents