Samsung S3C2440A Laptop User Manual


 
PWM TIMER S3C2440A RISC MICROPROCESSOR
10-4
AUTO RELOAD & DOUBLE BUFFERING
S3C2440A PWM Timers have a double buffering function, enabling the reload value changed for the next timer
operation without stopping the current timer operation. So, although the new timer value is set, a current timer
operation is completed successfully.
The timer value can be written into Timer Count Buffer register (TCNTBn) and the current counter value of the
timer can be read from Timer Count Observation register (TCNTOn). If the TCNTBn is read, the read value does
not indicate the current state of the counter but the reload value for the next timer duration.
The auto-reload operation copies the TCNTBn into TCNTn when the TCNTn reaches 0. The value, written into the
TCNTBn, is loaded to the TCNTn only when the TCNTn reaches 0 and auto reload is enabled. If the TCNTn
becomes 0 and the auto reload bit is 0, the TCNTn does not operate any further.
Write
TCNTBn = 100
Write
TCNTBn = 200
Start
TCNTBn = 150
Auto-reload
150 100 100 200
Interrupt
Figure 10-3. Example of Double Buffering Function