Samsung S5PC100 User Manual page 603

Table of Contents

Advertisement

SYSTEM TIMER
6.3 START TIMER
1. Set TCFG SFR to make appropriate TCLK.
A. Select clock source.
B. Set pre-scaler and divider value.
2. Set tick counter by writing to TCNTB SFR.
3. Wait until TCNTB write interrupt occurs, and write 1 to INT_CSTAT[2] to clear interrupt status bit.
4. Write TCON[1:0] = 2'b11 to update wanted value to internal timer counter at that time and start tick counter.
5. Wait until TCON write interrupt occurs, and write 1 to INT_CSTAT[4] to clear interrupt status bit.
6. If auto-reload mode is needed, TCON[1] must be de-asserted and write 1 to TCON[2].
7. Wait until TCON write interrupt occurs, and write 1 to INT_CSTAT[4] to clear interrupt status bit.
8. Set interrupt counter by writing to ICNTB SFR.
9. Wait until ICNTB write interrupt occurs, and write 1 to INT_CSTAT[3] to clear interrupt status bit.
10. Write TCON[4:3] = 2'b11 to update wanted value to internal interrupt counter at that time and start interrupt
counter.
11. Wait until TCON write interrupt occurs, and write 1 to INT_CSTAT[4] to clear interrupt status bit.
12. If auto-reload mode is needed, TCON[4] must be de-asserted and write 1 to TCON[5]..
13. Wait until TCON write interrupt occurs, and write 1 to INT_CSTAT[4] to clear interrupt status bit.
6.4 STOP TIMER
1. Write INT_CSTAT[0] = 1'b0 to disable Interrupt counter expired (INTCNT=0) Interrupt.
2. Write TCON[3] = 1'b0 to stop internal interrupt counter.
3. Write TCON[0] = 1'b0 To stop internal timer counter.
6.5 CHANGE INTERVAL INTERRUPT AT RUN-TIME
To run system timer as figure 7.2-4,
1. Set new interrupt counter value by writing to ICNTB SFR.
2. Wait until ICNTB write interrupt occurs, and write 1 to INT_CSTAT[3] to clear interrupt status bit.
3. Write TCON [4] = 1'b1 to update new value to internal interrupt counter at that time.
4. Wait until TCON write interrupt occurs, and write 1 to INT_CSTAT[4] to clear interrupt status bit.
And the new value is updated after interrupt counter is expired.
7.2-6
S5PC100 USER'S MANUAL (REV1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents