PWM TIMER
S3C2416X RISC MICROPROCESSOR
12-4
2.2 BASIC TIMER OPERATION
Figure 12-2. Timer Operations
A timer (except the timer ch-4) has TCNTBn, TCNTn, TCMPBn and TCMPn. The TCNTBn and the TCMPBn are
loaded into the TCNTn and the TCMPn when the timer reaches 0.
When the TCNTn reaches 0, an interrupt request will occur if the interrupt is enabled.
NOTE
TCNTn and TCMPn are the names of the internal registers. (16bit Internal down-counter (register) and
16bit internal compare register, respectively.) The TCNTn register can be read from the TCNTOn register
If you want to generate interrupt at intervals 3cycle of TOUTn, set TCNTBn, TCMPBn and TCON register like
Figure 12-2. That is :
i)
Set TCNTBn=3 and TCMPBn=1.
ii)
Set auto-reload=1 and manual update=1.
When manual update bit is 1, TCNTBn and TCMPBn value are loaded to TCNTn and TCMPn.
iii)
Set TCNTBn=2 and TCMPBn=0 for next operation.
iv)
Set auto-reload=1 and manual update=0.
If you set manual update=1 at this time, TCNTn is changed to 2 and TCMP is changed to 0.
So, interrupt is generated at interval 2cycle instead of 3cycle.
You must set auto-reload=1 automatically for next operation.
v)
Set start = 1 for operation start and then TCNTn is down counting.
When TCNTn is 0, interrupt is generated and If auto-reload is enable, TCNTn is loaded 2
(TCNTBn value) and TCMPn is loade 0(TCMPn value).
vi)
Before stop, TCNTn is down counting.
Summary of Contents for S3C2416
Page 122: ...BUS MATRIX EBI S3C2416X RISC MICROPROCESSOR 3 4 NOTES ...
Page 204: ...DMA CONTROLLER S3C2416X RISC MICROPROCESSOR 8 18 NOTES ...
Page 284: ...WATCHDOG TIMER S3C2416X RISC MICROPROCESSOR 11 6 NOTES ...
Page 320: ...REAL TIME CLOCK S3C2416X RISC MICROPROCESSOR 13 16 NOTES ...
Page 344: ...UART S3C2416X RISC MICROPROCESSOR 14 24 NOTES ...
Page 380: ...USB2 0 DEVICE S3C2416X RISC MICROPROCESSOR 16 34 NOTES ...
Page 432: ...2D S3C2416X RISC MICROPROCESSOR 18 38 NOTES ...
Page 446: ...HS_SPI CONTROLLER S3C2416X RISC MICROPROCESSOR 19 14 NOTES ...
Page 604: ...S3C2416X RISC MICROPROCESSOR S3C2416X RISC MICROPROCESSOR 23 22 NOTES ...
Page 638: ...PCM AUDIO INTERFACE S3C2416X RISC MICROPROCESSOR 25 18 NOTES ...
Page 670: ...ELECTRICAL DATA S3C2416X RISC MICROPROCESSOR 26 32 NOTES ...