PetteriAimonen opened a new pull request, #11211: URL: https://github.com/apache/nuttx/pull/11211
## Summary Adds support for hardware timestamping of received Ethernet packets. The timestamp is available to applications using socket option `SO_TIMESTAMP`. Optionally, the Ethernet PTP timer can be used as system high-resolution RTC. In this mode it supports fine resolution rate adjustment. Alternatively other time source for `CLOCK_REALTIME` can be used, and the PTP timestamps are converted by sampling the clocks and computing the difference. This results in a few microseconds of uncertainty. Depends on pull request #11210 to be actually useful, but can be merged separately. (Related: #10887, ping @xiaotailang ) ## Impact Enabling `CONFIG_STM32_ETH_PTP` will start the PTP timer when Ethernet interface is brought up. Enabling `CONFIG_STM32_ETH_PTP_RTC_HIRES` and `CONFIG_RTC_HIRES` enables the PTP timer as system high-resolution time source. Enabling `CONFIG_STM32_ETH_TIMESTAMP_RX` will capture timestamp for each received packet. If `SO_TIMESTAMP` is set on UDP socket, the timestamp is passed to user application. ## Testing Tested on custom STM32F417 board, both using PTP as RTC_HIRES and against a separate RTC_HIRES implementation. -- 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]
