cancel
Showing results for 
Search instead for 
Did you mean: 

How to make STM32MP151 successfully run LINUXPTP

fudaguo
Associate II

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.

翻译

搜索

复制

4 REPLIES 4
OlivierK
ST Employee

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

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

 

 

翻译

搜索

复制

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

Thank you for your detailed guidance! Using the configuration file you provided, the main clock is also configured as L2, P2P, but new the MP15 board cannot parse the announce message of the main clock. Therefore, BMC chose itself as the main clock and cannot synchronize.

ptp4l[8284.723]: port 1: announce timeout
ptp4l[8284.724]: selected local clock 36f82e.fffe.bff8cf as best master

I noticed that the important differences between this configuration and the previous configuration files are L2, P2P, and follow_up_Info 1, when setting the following_up_info to 1 will result in unrecognized announce messages .When I configure the MP15 board as the main clock and there is only one main clock in the network, the MP15 board still cannot periodically send SYNC and announce messages.Our difference is that the main clock is different, but now this configuration is not working properly with my MP15 board as the main clock.

翻译

搜索

复制