After starting PTP master clock synchronization, the log error occurred when ptp4l GrandMaster was started
ptp4l[67736.277]: port 1: announce timeout
ptp4l[67736.278]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[67736.278]: selected local clock 3c6d66.fffe.33eb0e as best master
ptp4l[67736.278]: assuming the grand master role
ptp4l[67736.279]: port 1: master tx announce timeout
ptp4l[67737.278]: port 1: master sync timeout
ptp4l[67737.779]: timed out while polling for tx timestamp
ptp4l[67737.779]: increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug
ptp4l[67737.779]: port 1: send sync failed
ptp4l[67737.779]: port 1: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
ptp4l[67737.779]: waiting 2^{4} seconds to clear fault on port 1
Is there a problem with this kernel driver? What is the solution?
*** Please note that this reply is generated by LLM automatically ***
The log error you’re experiencing with ptp4l suggests a problem with the kernel driver, specifically with the timestamping functionality. The error messages indicate a series of timeouts and failures in the synchronization process, ultimately leading to a fault detection on the port.
The ptp4l daemon is a user-space implementation of the Precision Time Protocol (PTP), which relies on the kernel driver to provide timestamping functionality. The kernel driver in question is likely the mttcan kernel driver, which is responsible for handling the CAN (Controller Area Network) interface.
The error messages suggest that the kernel driver is not providing the necessary timestamping information to ptp4l, leading to timeouts and failures in the synchronization process. This could be due to a bug in the kernel driver or a configuration issue.
To troubleshoot this issue, you can try the following:
Check the kernel driver version: Ensure that you are running the latest version of the mttcan kernel driver. You can check the version by running the command modinfo mttcan.
Verify CAN interface configuration: Make sure that the CAN interface is properly configured and enabled. You can check the configuration by running the command ip link show.
Check PLL_C clock configuration: As mentioned in the context, the PLL_C clock is used as the parent clock for CAN on T194 platforms. Ensure that the PLL_C clock is properly configured and enabled.
Enable PLLAON clock: If you need a higher clock frequency or greater accuracy, consider enabling the PLLAON clock and making it the parent clock of MTTCAN.
Increase tx_timestamp_timeout: As suggested by the error message, increasing the tx_timestamp_timeout value may correct the issue. However, this is likely a workaround rather than a solution to the underlying problem.
To resolve the issue, you may need to update the kernel driver or modify the configuration of the CAN interface or PLL_C clock. If you are using a custom kernel driver, you may need to debug and fix the issue in the driver code.
In comparison to other platforms, the Jetson Xavier NX and Jetson AGX Xavier series devices are known to have specific requirements for CAN interface configuration and clock settings. Therefore, it’s essential to consult the NVIDIA documentation and ensure that your configuration meets the requirements for these platforms.
In summary, the problem is likely related to the kernel driver or configuration, and resolving the issue will require troubleshooting and potentially updating the kernel driver or modifying the configuration of the CAN interface or PLL_C clock.
“After making the configuration changes and starting the time synchronization, the log reported an error.
The master clock can be started on the Orin AGX, with the output log:”
ptp4l[14708.138]: port 1: received link status notification
ptp4l[14708.138]: interface index 3 is up
ptp4l[14708.909]: port 1: setting asCapable
ptp4l[14722.983]: port 1: announce timeout
ptp4l[14722.983]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[14722.983]: selected local clock 3c6d66.fffe.33eb0e as best master
ptp4l[14722.983]: assuming the grand master role
“The slave clock can normally receive synchronization information from the master clock, and it can display the clock offset with the master clock. Complete PTP (Precision Time Protocol) synchronization data packets, including sync, follow_up, delay_req, and delay_resp, can be captured on the host that initiates the master clock.
However, while the master clock successfully provides synchronization services, it continuously logs timeout messages. During this period, the slave clock continues to receive synchronization messages from the master clock and adjusts its own time accordingly.”
ptp4l[14722.983]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[14722.983]: selected local clock 3c6d66.fffe.33eb0e as best master
ptp4l[14722.983]: assuming the grand master role
ptp4l[14722.984]: port 1: master tx announce timeout
ptp4l[14723.983]: port 1: master sync timeout
ptp4l[14724.983]: port 1: master sync timeout
ptp4l[14724.984]: port 1: master tx announce timeout
ptp4l[14725.983]: port 1: master sync timeout
ptp4l[14726.984]: port 1: master sync timeout
ptp4l[14726.984]: port 1: master tx announce timeout
ptp4l[14727.984]: port 1: master sync timeout
ptp4l[14728.984]: port 1: master sync timeout
ptp4l[14730.985]: port 1: master tx announce timeout
ptp4l[14731.985]: port 1: master sync timeout
ptp4l[14732.985]: port 1: master sync timeout
ptp4l[14732.986]: port 1: master tx announce timeout
ptp4l[14733.985]: port 1: master sync timeout
ptp4l[14742.987]: port 1: master tx announce timeout
ptp4l[14742.987]: port 1: master sync timeout
ptp4l[14743.987]: port 1: master sync timeout
ptp4l[14744.987]: port 1: master tx announce timeout
ptp4l[14744.988]: port 1: master sync timeout
ptp4l[14745.988]: port 1: master sync timeout
And during the ongoing PTP synchronization, there is a certain probability that the network card driver may briefly disconnect and then reconnect (the master clock and the slave clock are directly connected via an Ethernet cable, which ensures the stability of the physical connection).
ptp4l[14751.989]: port 1: master sync timeout
ptp4l[14752.988]: port 1: master tx announce timeout
ptp4l[14752.989]: port 1: master sync timeout
ptp4l[14753.314]: port 1: received link status notification
ptp4l[14753.314]: interface index 3 is up
ptp4l[14753.989]: port 1: master sync timeout
ptp4l[14754.988]: port 1: master tx announce timeout
ptp4l[14754.989]: port 1: master sync timeout
ptp4l[14755.990]: port 1: master sync timeout
ptp4l[14756.989]: port 1: master tx announce timeout