UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
724 of 1269
NXP Semiconductors
UM10503
Chapter 26: LPC43xx Ethernet
Most of the PTP implementation is done in the software above the UDP layer. However,
the hardware support is required to capture the exact time when specific PTP packets
enter or leave the Ethernet port at the MII. This timing information must be captured and
returned to the software for the proper implementation of PTP with high accuracy.
26.7.3.1 Reference timing source
To get a snapshot of the time, the MAC requires a reference time in 64-bit format as
defined in the IEEE 1588 specification. The Ethernet MAC uses internal timing to provide
a reference timing source by using the reference clock input to generate the Reference
time (also called the System Time) internally and capture timestamps. The generation,
update, and modification of the System Time are described in
.
26.7.3.2 System time register module
The 64-bit time is maintained in this module and updated using the input reference clock.
This time is the source for taking snapshots (timestamps) of Ethernet frames being
transmitted or received at the MII.
The System Time counter can be initialized or corrected using the coarse correction
method. In this method, the initial value or the offset value is written to the Timestamp
Update register (
). For initialization, the System Time counter is written with the
value in the
Timestamp Update registers, while for system time correction, the offset value is added to
or subtracted from the system time.In the fine correction method, a slave clock’s
frequency drift with respect to the master clock (as defined in IEEE 1588) is corrected
over a period of time instead of in one clock, as in coarse correction. This helps maintain
linear time and does not introduce drastic changes (or a large jitter) in the reference time
between PTP Sync message intervals. In this method, an accumulator sums up the
contents of the Addend register, as shown in Figure 4-2. The arithmetic carry that the
accumulator generates is used as a pulse to increment the system time counter. The
accumulator and the addend are 32-bit registers. Here, the accumulator acts as a
high-precision frequency multiplier or divider.
This algorithm is shown in