Real-time clock
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.