TA600032-EN0/0
- 78 -
6.6
Relative time management
"G9006" has "Relative time management counter" (RTMC) and "Relative time latch" (RTLT) functions.
"Local CPU" can use two counters to calculate the timing of "Port change event" interrupt.
6.6.1
Relative time management counter (RTMC)
The "Relative time management counter" becomes "0" at "Reset" of "G9006" and increases every 1 ms.
"Relative time management counter" can be read from "RTMC" (08h) register.
Since the "Relative time management counter" is 32 bits, it will overflow in about 49.7 days.
When it overflows, it continues counting from "0".
In this case, the time difference between "Relative time management counter" and "Relative time latch" is not reliable.
When an overflow occurs, an interrupt of "Relative time management counter digit overflow event" is generated.
For details, see "6.8.2.6 Relative time management counter digit overflow event".
6.6.2
Relative time latch (RTLT)
"Relative time latch" can latch the value of "Relative time management counter" (RTMC).
The latch timing is when "Port change event" (MSTS.IPTC) interrupt occurs.
The "Relative time latch" can be read by the control command of "Relative time latch reading".
For the control command, see "5.2.2.3.11 Relative time latch reading".
When a "Port change event" interrupt is generated, "Port change interrupt information" (PCII) is recorded in a queue.
This "Port change interrupt information" includes the lower 4 bits of the "Relative time latch".
"Port change interrupt information" can be read using the "Port change interrupt information reading " control command.
Until "PCII.Pn = 0000b" is read, the "Port change interrupt information reading" control command can be repeatedly written. Port
change interrupt info
For details, see "5.2.2.3.12 Port change interrupt information reading".
6.7
ID code reading
"G9006" has an "ID code" to distinguish itself from other LSI products.
"ID code" can be read by "RIDC" (20h) register.
The "ID code" that can be read is "0420h".