Hi @Gavin_Jia
Thank you for your response and for sharing the links.
Let’s not beat around the bush — or worse, try to climb mirrors.
The issue I raised is real, reproducible, and affects every SDK version up to and including MCUXpresso SDK 25.03.000, which still ships with fsl_enet.c v2.9.2. This driver is shared across the entire RT1xxx family (RT1175, RT1051, RT1021, etc.), and contains logic in ENET_ReclaimTxDescriptor() that assigns msTimerSecond as the "seconds" part of the TX timestamp after the frame has already been sent — sometimes significantly after.
It doesn’t take much imagination to see what can go wrong: under normal conditions — or worse, under load or ISR latency — msTimerSecond may no longer correspond to the actual second when the hardware captured the nanoseconds field. This leads to fundamentally broken timestamps. There’s no way around it: if the driver exposes an API that returns both seconds and nanoseconds, then it must guarantee those values are coherent.
Expecting every application to detect and fix this at the user level is neither scalable nor robust — nor fair. The burden of ensuring consistency between timestamp components should lie in the driver, especially when:
The ENET peripheral does support atomic timestamping, and has registers for 1588_TSTMP_SEC and 1588_TSTMP_NSEC, latchable together on TX.
There is a crossbar mechanism in some SoCs (like RT117x) that allows incrementing seconds automatically on nanosecond overflow — i.e., the hardware can do this reliably without software intervention.
The application note you reference (AN12149) — which I know very well, and have discussed here:
https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Request-to-Update-AN12149-for-Modern-SDKs-and-Mi...
— does not even cover RT117x, and uses a driver version from SDK 2.15 (ENET 2.7.1), which suffers from the same exact issue.
You say that in your ptpd-based example the seconds are handled differently in the application. That’s fine — but let’s be honest: if you’ve already solved the issue in the application, then why not apply that knowledge to fix the driver itself? That would benefit everyone — not just ptpd users — and make timestamping reliable out of the box.
Right now, the driver is returning partially valid timestamp data that looks fine but isn't — which is arguably worse than returning nothing at all. That is a recipe for long hours of debugging and inaccurate behavior in TSN, AVB, or PTP use cases.
Is there any plan to acknowledge this issue officially, and provide a proper fix in a future SDK?
Best regards,
Max