daniel-p-carvalho commented on PR #3782:
URL: https://github.com/apache/nuttx-apps/pull/3782#issuecomment-5721166920
Rebased onto latest `upstream/master` and updated the hardware clock
disciplining approach:
1. **POSIX `clock_adjtime` instead of proprietary ioctls:**
- Removed all custom ioctl calls (`SIOCS_PTP_ADJFREQ`,
`SIOCS_PTP_ADJPHASE`, `SIOCG_TX_HW_TIMESTAMP`).
- When a hardware PTP clock device (e.g. `/dev/ptp0`) is used via `-p
/dev/ptp0`, `ptpd` now acts as a PI servo driving the hardware clock's
frequency and phase alignment directly via standard POSIX
`clock_adjtime(state->clockid, &buf)` with `ADJ_FREQUENCY`.
- This aligns with the new POSIX PTP hardware clock driver introduced in
apache/nuttx#20180.
2. **Clean P2P delay & bugfix series:**
- Fixed Delay_Resp consumption by `sendmsg()` and implemented canonical
IEEE 1588 ยง11.3 mean path delay calculation.
- Implemented IEEE 1588 Peer-to-Peer (P2P) delay mechanism (`-P`).
- Added warning when P2P is used without `CONFIG_SCHED_TICKLESS`.
- Reset `pdelay_waiting_followup` when initiating a new P2P cycle to
prevent stale timestamp pairing.
- Discard implausible crystal oscillator drift rate spikes before
averaging to prevent drift divergence.
All 6 commits have been verified with `checkpatch.sh` (all checks pass) and
validated on physical hardware (STM32F4 Discovery with STM32 Ethernet PTP MAC
against a Meinberg PTP Grandmaster).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]