Skip to main content
Associate
December 15, 2023
Solved

How to make STM32MP151 successfully run LINUXPTP

  • December 15, 2023
  • 2 replies
  • 5055 views

STM32MP151 is a PTP slave clock, and the master clock is correctly determined and configured. In the same network, multicast, E2E, and one-step configuration modes are used. Run ptp4l,Output prompt: "Received SYNC without timestamp". the actual SYNC message of the main clock has a hardware timestamp.

Other relevant information can be found in the info1. log file.

STM32MP151 is the PTP slave clock IP: 192.168.1.251, the PTP master clock IP: 192.168.1.3, Captured data packet shows that the master clock has a timestamp, and the slave clock DELAY_REQ  has no timestamp.

翻译

搜索

复制

Best answer by OlivierK

Hi @fudaguo 

 

The STM32MP151 GMAC IP supports the One-step PTP, however the stmmac synopsys kernel driver doesn't. (only second-step PTP supported).

Some tries have been done with 2 STM32MP157-DK board,  ptp4l, adding twoStepFlag 0 in the gPTP.cfg, and the test fails. (it passed with twoStepFlag 1).

 

Rgds,

Olivier

 

2 replies

OlivierK
Technical Moderator
December 21, 2023

Hi @fudaguo 

 

The STM32MP151 GMAC IP supports the One-step PTP, however the stmmac synopsys kernel driver doesn't support it. (only second-step PTP supported).

Some tries have been done with 2 STM32MP157-DK board,  ptp4l, adding twoStepFlag 0 in the gPTP.cfg, and the test fails. (it passed with twoStepFlag 1).

 

Rgds,

Olivier

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
fudaguoAuthor
Associate
December 22, 2023

hank you. As far as I know, the default configuration for running PTP4L is twostep, which I have tried before. Configure the PTP main clock as twostep.
I also used the configuration file with twostepflag 1 to run the PTP slave clock on STM32MP151, but the result was still the same, with the same error message "Received SYNC without timestamp"

./ptp4l -i eth0 -m -s -f cfgptpSlaveTwoStep.cfg -p /dev/ptp0

 

 

翻译

搜索

复制

OlivierK
Technical Moderator
December 22, 2023
Hi @fudaguo 

This was my config with two MP15 boards, assume_two_step 0 or 1 doesn't make any difference. You may increase the
neighborPropDelayThresh if there is a sync issue.

gPTP.cfg: [global] slaveOnly 0 gmCapable 1 priority1 248 priority2 248 logAnnounceInterval 1 logSyncInterval -3 syncReceiptTimeout 3 neighborPropDelayThresh 30000 min_neighbor_prop_delay -20000000 assume_two_step 0 path_trace_enabled 1 follow_up_info 1 #transportSpecific 0x1 ptp_dst_mac 01:1B:19:00:00:00 p2p_dst_mac 01:80:C2:00:00:0E network_transport L2 delay_mechanism P2P -board> ptp4l -m -i eth0 -p /dev/ptp0 -f /etc/ptp4l_cfg/gPTP.cfg you should see something as below on the slave board log: root@stm32mp1:~# ptp4l -m -i eth0 -p /dev/ptp0 -f /etc/ptp4l_cfg/gPTP.cfg ptp4l[3608.694]: selected /dev/ptp0 as PTP clock ptp4l[3608.820]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[3608.821]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[3612.491]: port 1: new foreign master 0080e1.fffe.427ced-1 ptp4l[3615.716]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[3615.717]: selected local clock 10e77a.fffe.e18814 as best master ptp4l[3615.717]: port 1: assuming the grand master role ptp4l[3616.491]: selected best master clock 0080e1.fffe.427ced ptp4l[3616.492]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[3616.995]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[3617.745]: rms 1152 max 1535 freq +1402 +/- 805 delay 18968 +/- 0 ptp4l[3618.746]: rms 209 max 330 freq +701 +/- 280 delay 18969 +/- 0 ptp4l[3619.747]: rms 354 max 378 freq +67 +/- 93 delay 18969 +/- 0 ptp4l[3620.748]: rms 232 max 306 freq -74 +/- 12 delay 18969 +/- 0 ptp4l[3621.748]: rms 77 max 113 freq -9 +/- 23 delay 18968 +/- 0 ptp4l[3622.749]: rms 19 max 39 freq +70 +/- 26 delay 18968 +/- 0
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
October 29, 2025

Hi,

I am trying to run LinuxPTP on STM32MP257 MPU in L4-UDP Unicast mode, 2 step. The system seems to work fine, if I configure to set HWTSTAMP_FILTER_ALL, but if I use default LinuxPTP filter (HWTSTAMP_FILTER_PTP_V2_EVENT) I am getting error saying the SYNC packets are received without timestamp. From the user manual (Table 916), it seems that the matching filter also looking for multicast IP, is it correct? This means that unicast PTP won't work with FILTER_ALL?

Thanks!

Alexey.

Visitor II
March 6, 2026

Hello altsir_sga.

Could you please tell how to configure to set HWTSTAMP_FILTER_ALL? I met the same problem as received without timestamp。 Thank you very much.

Associate III
March 8, 2026

Hi,

You need to add "hwts_filter full" to ptp4l config file.

 

Alexey.