| |||

Home > ETMv3 Signal Protocol > Timestamping, ETMv3.5 > Encoding of the timestamp value |

Bit 28 of the ETMCCER specifies the encoding of the timestamp
value in the timestamp packet. See *Configuration Code
Extension Register, ETMCCER, ETMv3.1 and later*

If the ETM outputs the timestamp values as a Gray-coded number,
the number is calculated from the natural binary number using the
following equation, where Gray[n] is the n^{th} bit
of the resultant Gray code, and binary[n] is the n^{th} bit
of the binary number:

Gray[n] = binary[n] XOR binary[n+1]

The debugger generates the binary number from the traced Gray code using the following equation:

binary[n] = XOR(Gray[N:n]).

In this equation, N+1 is the size in bits of the timestamp.