Difference between revisions of "TIMER Registers"
Jump to navigation
Jump to search
(Created page with "== Registers == {| class="wikitable" border="1" ! NAME ! PHYSICAL ADDRESS ! WIDTH |- | REG_TM0VAL | 0x10003000 | 2 |- | REG_TM0CNT | 0x10003002 | 2 |- | REG_TM1VAL | 0x1000300...") |
|||
Line 32: | Line 32: | ||
| 0x1000300C | | 0x1000300C | ||
| 2 | | 2 | ||
− | + | |- | |
| REG_TM3CNT | | REG_TM3CNT | ||
| 0x1000300E | | 0x1000300E |
Revision as of 22:39, 12 August 2012
Registers
NAME | PHYSICAL ADDRESS | WIDTH |
---|---|---|
REG_TM0VAL | 0x10003000 | 2 |
REG_TM0CNT | 0x10003002 | 2 |
REG_TM1VAL | 0x10003004 | 2 |
REG_TM1CNT | 0x10003006 | 2 |
REG_TM2VAL | 0x10003008 | 2 |
REG_TM2CNT | 0x1000300A | 2 |
REG_TM3VAL | 0x1000300C | 2 |
REG_TM3CNT | 0x1000300E | 2 |
Timer value
Writing to REG_TMxVAL loads a starting value for one of the 4 timers, while reading it will show the current timer value.
Timer control
BIT | DESCRIPTION |
---|---|
0-1 | Prescaler select (0=F/1, 1=F/64, 2=F/256, 3=F/1024) |
2 | Count-up (0=Disabled, 1=Enabled) |
3-5 | Not used |
6 | IRQ enable (0=Disabled, 1=IRQ on timer value overflow) |
7 | Start/Stop (0=Stop, 1=Start) |
Count-up
When count-up is enabled, the timer value will increase every time the previous timer overflows.