Difference between revisions of "Real-time clock"
(Created page with "There are various Real-time clock (RTC) chip used in the TI systems. == MM58271 (Geneve) ==") |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
There are various Real-time clock (RTC) | There are various Real-time clock (RTC) chips used within the TI and Geneve systems. | ||
== | == MM58274 (Geneve) == | ||
The left address column shows the address mapping in the Native mode, while the right address column shows the GPL mode mapping. | |||
{| class="memory" | |||
! F130 / 8010 | |||
| class="mmap" | Control register | |||
|- | |||
! F131 / 8011 | |||
| class="mmap" | Tenths of seconds | |||
|- | |||
! F132 / 8012 | |||
| class="mmap" | Units of seconds | |||
|- | |||
! F133 / 8013 | |||
| class="mmap" | Tens of seconds | |||
|- | |||
! F134 / 8014 | |||
| class="mmap" | Units of minutes | |||
|- | |||
! F135 / 8015 | |||
| class="mmap" | Tens of minutes | |||
|- | |||
! F136 / 8016 | |||
| class="mmap" | Units of hours | |||
|- | |||
! F137 / 8017 | |||
| class="mmap" | Tens of hours | |||
|- | |||
! F138 / 8018 | |||
| class="mmap" | Units of days | |||
|- | |||
! F139 / 8019 | |||
| class="mmap" | Tens of days | |||
|- | |||
! F13A / 801A | |||
| class="mmap" | Units of months | |||
|- | |||
! F13B / 801B | |||
| class="mmap" | Tens of months | |||
|- | |||
! F13C / 801C | |||
| class="mmap" | Units of years | |||
|- | |||
! F13D / 801D | |||
| class="mmap" | Tens of years | |||
|- | |||
! F13E / 801E | |||
| class="mmap" | Day of week | |||
|- | |||
! F13F / 801F | |||
| class="mmap" | Clock setting / Interrupt registers | |||
|} | |||
There are some points to consider for both reading and writing. | |||
=== Reading === | |||
Reading from a clock register is done by doing a MOVB from the respective address. Since the Geneve can address single bytes, only the addressed byte will be read. | |||
However, the clock is only connected by 4 lines to the 8-bit data bus. The leading 4 bits (the high nibble) take some other value. We can observe: | |||
* In Native mode, the high nibble is 0xF (binary 1111) | |||
* In GPL mode, the high nibble is 0x1 (0001) for 8010-801E, and 0x2 (0010) for 801F. | |||
Therefore, the read byte should be masked with 0x0F. The reason for this behavior is not known; maybe the high four bits are delivered by stale values in the Gate array. | |||
=== Writing === | |||
Setting the clock registers is done via MOVB to the address. However, this may not show the expected effect. According to the datasheet of the MM58274, a [[Setting the Geneve clock | certain procedure]] must be followed to properly set the clock. | |||
[[Category:Geneve]] | |||
[[Category:Hardware]] |
Latest revision as of 21:29, 26 January 2021
There are various Real-time clock (RTC) chips used within the TI and Geneve systems.
MM58274 (Geneve)
The left address column shows the address mapping in the Native mode, while the right address column shows the GPL mode mapping.
F130 / 8010 | Control register |
---|---|
F131 / 8011 | Tenths of seconds |
F132 / 8012 | Units of seconds |
F133 / 8013 | Tens of seconds |
F134 / 8014 | Units of minutes |
F135 / 8015 | Tens of minutes |
F136 / 8016 | Units of hours |
F137 / 8017 | Tens of hours |
F138 / 8018 | Units of days |
F139 / 8019 | Tens of days |
F13A / 801A | Units of months |
F13B / 801B | Tens of months |
F13C / 801C | Units of years |
F13D / 801D | Tens of years |
F13E / 801E | Day of week |
F13F / 801F | Clock setting / Interrupt registers |
There are some points to consider for both reading and writing.
Reading
Reading from a clock register is done by doing a MOVB from the respective address. Since the Geneve can address single bytes, only the addressed byte will be read.
However, the clock is only connected by 4 lines to the 8-bit data bus. The leading 4 bits (the high nibble) take some other value. We can observe:
- In Native mode, the high nibble is 0xF (binary 1111)
- In GPL mode, the high nibble is 0x1 (0001) for 8010-801E, and 0x2 (0010) for 801F.
Therefore, the read byte should be masked with 0x0F. The reason for this behavior is not known; maybe the high four bits are delivered by stale values in the Gate array.
Writing
Setting the clock registers is done via MOVB to the address. However, this may not show the expected effect. According to the datasheet of the MM58274, a certain procedure must be followed to properly set the clock.