nuttx/arch/arm
Daniel P. Carvalho e3dfc9875d arch/arm/stm32h7: timestamp the received PTP frames.
Add STM32_ETH_TIMESTAMP_RX for the STM32H7, as the one of the legacy
STM32 that provides the timestamp of the frames received.

Timestamp the PTP version 2 messages, over Ethernet and over UDP, except
for the announce, management and signaling messages. The MAC writes the
timestamp in a context descriptor after the last descriptor of the frame.
The driver reads it before giving the frame to the network stack and
passes it in d_rxtime, in the time of the system time of the MAC, the same
as /dev/ptp0. A frame that is not timestamped has a time of zero.

The timestamp goes over the address of the buffer of the context
descriptor, and the code that dropped the context descriptors used a
pointer that was never set. Keep the address of the buffer of each RX
descriptor, and restore it when a context descriptor is given back.

The timestamps of the PTP frames of a grandmaster clock were checked on
hardware against the system time of the MAC, and were within the delay of
the reads.

Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
Assisted-by: Claude:claude-sonnet-5
2026-09-21 15:11:15 +08:00
..
include arch/arm/imxrt: Add support for IOMUXC and rgpio for imxrt118x 2026-09-19 22:38:45 +08:00
src arch/arm/stm32h7: timestamp the received PTP frames. 2026-09-21 15:11:15 +08:00
CMakeLists.txt
Kconfig arch/arm/imxrt: Add imxrt118x_memorymap 2026-09-19 22:38:45 +08:00