Enabling gPTP for Arduino Portenta H7 with the portenta hat carrier #80567
Replies: 4 comments
-
Which version of Zephyr are you running? |
Beta Was this translation helpful? Give feedback.
-
Hello, I am currently using the version 3.7.99 |
Beta Was this translation helpful? Give feedback.
-
Are you able to use other protocols than ICMP? Does UDP/TCP work with the board? (if you disable gPTP) |
Beta Was this translation helpful? Give feedback.
-
Hello jukkar, Yes, I am able to use UDP/TCP when gPTP is disabled, but not when it is enabled. When trying to send UDP packets to my computer from the board with gPTP enabled, the board sends first a ARP request to obtain the MAC address of my computer port, meaning it is actually capable of sending data. My computer then sends its MAC address to the board. But the board keeps sending the ARP request as it hasn't received the response from the computer. Moreover, the ARP cache is empty, which also suggests that the response form the computer hasn't been received. Inversely, when trying to send a UDP packet from my computer, it sends a ARP request to board which doesn't answer to it, also suggesting that the board can't read the data. I therefore believe that enabling gPTP change something at a driver level which makes the board able to send data but enable the receive ones. I hope that I have been precise enough. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I am currently working on enabling the gPTP protocol for Arduino Portenta H7 with the Portenta Hat Carrier. I’m facing some issues and would appreciate some assistance. In summary, it seems that when gPTP is enabled, the board is unable to handle incoming Ethernet data, which prevents the gPTP state machine from initializing properly.
It’s important to mention that this configuration should support gPTP, as the Portenta's microcontroller is compatible, and the Portenta Hat Carrier provides an Ethernet port with hardware timestamping.
Steps to Reproduce
Since the Portenta Hat Carrier isn’t directly supported by Zephyr, I made minor adjustments to the Ethernet devicetree for the Portenta to include the Ethernet port of the Hat Carrier. The small update allowed me to perform basic Ethernet operations like pinging and sending UDP packets:
Results
When running the code, the board gets stuck during the state machine initialization, continuously sending "Pdelay requests," as shown in the logs:
Wireshark gives us the following traffic over the Ethernet port between my computer ("Hewlett...") and the board ("STMicro"):
Analysis
Wireshark shows that while the Pdelay request is processed by my computer, and a response is sent, the board doesn’t seem to acknowledge it and sends instead a new request. A similar issue occurs when pinging the computer from the board. The board sends an ARP request, the computer responds, but the board sends another ARP request as if it hasn’t received the response. Pinging works fine when gPTP is disabled, indicating that the issue might be related to gPTP implementation.of this problem.
Any suggestions ?
So far, I’ve tried tweaking the devicetree without success. I’m seeking assistance on how to resolve this issue—whether the solution lies in modifying gPTP drivers, the devicetree, or the source code. Any suggestions are welcome. Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions