This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5708: PTP over GMAC

Part Number: AM5708

Hi:

     I have a custom AM5708 based board and have 1 ethernet port over GMAC and 2 ethernet ports over PRU2.

I have 2 PTP master (Meinberg and MultySync). I have configured PRU ethernet ports as PRP.

I have configured the system to provide a PPS signal for both PTP over GMAC and PTP over PRU2.

I have noticed an strange behaviour with Meinberg master when running "ptp4l"

       1.- If I connect any master to PRU2 ethernet ports everything goes fine. I can see that my slave board is synchronized to the current master attached and the PPS signal is ok with the PPS master signal.

       2.- The issue comes up in GMAC port. The sequence is as follows:

                    - connect GMAC port to Meinberg master ------------->  OK: slave board synchonized ok and PPS signal ok with PPS master signal

                    - desconnect Meinberg master from GMAC

                    - connect GMAC port to MultySync master ------------->  OK: slave board synchonized ok and PPS signal ok with PPS master signal

                    - desconnect Multisync master from GMAC

                    - connect GMAC port to Meinberg master ------------->  BAD: slave board synchonized with an offset in the order of few milliseconds. PPS signal with an offset with respect to PPS master signal

                    - desconnect Meinberg master from GMAC

                    - connect GMAC port to MultySync master ------------->  OK: slave board synchonized ok and PPS signal ok with PPS master signal

                    - desconnect Multisync master from GMAC

                    - connect GMAC port to Meinberg master ------------->  BAD: slave board synchonized with an offset in the order of few milliseconds. PPS signal with an offset with respect to PPS master signal

                   .............................

                   and this behaviour continues for ever.

When it goes BAD, "ptp4l" console print messages looks fine. according to expected when it works fine

I have rebooted Meinberg master, restarted "ptp4", restarted my application ... and no way to recover from above situation.

The only way is by rebooting the whole board and starting again.

Any suggestion?

Regards

Billa

  • Hi:

        Here are attached some files that may help:

                        - ptp4l configuration file

                        - console output 

                        - ptp messaging for each master

    Hope this may help

    Regards

    Billa

    [global]
    step_threshold               0.005
    tx_timestamp_timeout         300
    domainNumber                 0
    priority1                    128
    priority2                    128
    slaveOnly                    1
    uds_address                  /var/run/ptp4l0
    
    [eth0]
    logMinPdelayReqInterval      -3
    egressLatency                726
    ingressLatency               186
    
    (10929740) Entering 'server' mode,...
    PTP_GMAC: ptp4l up & running !!GPIO:34 cmd:valueirection
    ptp4l[68.992]: selected /dev/ptp0 as PTP clock
    ptp4l[69.216]: port 1 (eth0): INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[69.219]: port 0 (/var/run/ptp4l0): INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[69.441]: port 1: new foreign master 001d7f.fffe.104ec2-1
    
    OK: RBAC_Client initialized
    
    Bridge_HMI_Main_Task Init
    client: System V IPC key = 1126109158
    client: Message queue id = 0
    IRIG_B_STATUS = 1
    IRIG_B is the SYNCHRONIZATION SOURCE.
    ptp4l[71.441]: selected best master clock 001d7f.fffe.104ec2 on port 1
    ptp4l[71.444]: port 1 (eth0): LISTENING to UNCALIBRATED on RS_SLAVE
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[72.442]: master offset -1573720143246673976 s0 freq      -0 path delay       304
    ptp4l[73.442]: master offset -1573720143246667575 s0 freq      -0 path delay       306
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[74.442]: master offset -1573720143246661201 s0 freq      -0 path delay       306
    ptp4l[75.442]: master offset -1573720143246654830 s1 freq   +5724 path delay       306
    [   75.621005] cpts_tmr_poll: enter INIT state
    [   75.721002] cpts_tmr_poll: exit INIT state with pps_offset = 0
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[76.442]: master offset        701 s2 freq   +7073 path delay       306
    ptp4l[76.444]: port 1 (eth0): UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
    ptp4l[77.442]: master offset         -8 s2 freq   +6390 path delay       306
    ptp4l[78.442]: master offset          6 s2 freq   +6400 path delay       305
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    PTP_GMAC_STATUS = 1
    PTP_GMAC is the SYNCHRONIZATION SOURCE.
    ptp4l[79.442]: master offset        -36 s2 freq   +6348 path delay       306
    ptp4l[80.442]: master offset         17 s2 freq   +6398 path delay       305
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[81.442]: master offset        -27 s2 freq   +6352 path delay       305
    ptp4l[82.442]: master offset         12 s2 freq   +6390 path delay       308
    ptp4l[83.442]: master offset         -9 s2 freq   +6364 path delay       306
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[84.442]: master offset         35 s2 freq   +6415 path delay       302
    ptp4l[85.442]: master offset        -21 s2 freq   +6367 path delay       307
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[86.442]: master offset        -32 s2 freq   +6351 path delay       305
    ptp4l[87.442]: master offset         13 s2 freq   +6370 path delay       304
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[88.442]: master offset         -4 s2 freq   +6372 path delay       304
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 001d7f.fffe.104ec2
    ptp4l[94.990]: port 1: announce timeout
    ptp4l[94.993]: port 1 (eth0): SLAVE to LISTENING on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
    ptp4l[94.994]: selected best master clock 00a0f4.fffe.deadbe
    PTP_GMAC:
            PORT=LISTENING
    PTP_GMAC_STATUS = 0
    IRIG_B is the SYNCHRONIZATION SOURCE.
    ptp4l[95.911]: port 1: received pdelay_resp msg with unexpected peer port id 0050c2.fffe.b72df2-1
    PTP_GMAC:
            PORT=LISTENING
    PTP_GMAC:
            PORT=LISTENING
    ptp4l[100.981]: port 1: new foreign master 0050c2.fffe.b72df2-1
    ptp4l[101.444]: port 1: announce timeout
    ptp4l[101.446]: selected best master clock 00a0f4.fffe.deadbe
    PTP_GMAC:
            PORT=LISTENING
    ptp4l[103.121]: selected best master clock 0050c2.fffe.b72df2 on port 1
    ptp4l[103.123]: running in a temporal vortex
    ptp4l[103.125]: port 1 (eth0): LISTENING to UNCALIBRATED on RS_SLAVE
    ptp4l[104.141]: master offset 3767520570245 s1 freq +1000000 path delay       145
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[105.291]: master offset   97974829 s1 freq +1000000 path delay -99116585
    ptp4l[106.301]: master offset    6119400 s1 freq +1000000 path delay -106239748
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[107.321]: master offset    -667601 s1 freq +1000000 path delay -106587080
    ptp4l[108.471]: master offset -107715350 s1 freq +1000000 path delay    -15561
    ptp4l[109.482]: master offset   -1034575 s1 freq -1000000 path delay     14297
    PTP_GMAC:
            PORT=UNCALIBRATED
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[110.501]: master offset    1016118 s1 freq -1000000 path delay     15979
    ptp4l[111.631]: master offset    1137164 s2 freq +1000000 path delay     15136
    ptp4l[111.634]: port 1 (eth0): UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    PTP_GMAC_STATUS = 1
    PTP_GMAC is the SYNCHRONIZATION SOURCE.
    ptp4l[112.641]: master offset     153610 s2 freq +154489 path delay       152
    ptp4l[113.651]: master offset        274 s2 freq  +16053 path delay       147
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[114.741]: master offset     -11974 s2 freq   +2429 path delay       141
    ptp4l[115.751]: master offset      -9026 s2 freq   -5273 path delay       141
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[116.772]: master offset       1781 s2 freq   +6845 path delay       147
    ptp4l[117.841]: master offset        269 s2 freq   +5602 path delay       141
    ptp4l[118.852]: master offset         -3 s2 freq   +5373 path delay       148
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[119.871]: master offset         14 s2 freq   +5398 path delay       147
    ptp4l[121.012]: master offset        -35 s2 freq   +5327 path delay       136
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[122.022]: master offset          6 s2 freq   +5378 path delay       147
    ptp4l[123.042]: master offset        -24 s2 freq   +5337 path delay       142
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[124.182]: master offset         28 s2 freq   +5386 path delay       145
    ptp4l[125.192]: master offset         -7 s2 freq   +5360 path delay       145
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[126.192]: master offset         29 s2 freq   +5396 path delay       145
    ptp4l[127.342]: master offset        -12 s2 freq   +5362 path delay       145
    ptp4l[128.342]: master offset         22 s2 freq   +5398 path delay       143
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[129.352]: master offset        -30 s2 freq   +5347 path delay       145
    ptp4l[130.503]: master offset         12 s2 freq   +5384 path delay       146
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[131.503]: master offset        -23 s2 freq   +5344 path delay       141
    ptp4l[132.513]: master offset         14 s2 freq   +5381 path delay       144
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[133.663]: master offset        -23 s2 freq   +5342 path delay       143
    ptp4l[134.683]: master offset          6 s2 freq   +5370 path delay       147
    ptp4l[135.682]: master offset         12 s2 freq   +5370 path delay       144
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[136.783]: master offset        -25 s2 freq   +5347 path delay       144
    ptp4l[137.803]: master offset        -42 s2 freq   +5313 path delay       145
    PTP_GMAC:
            PORT=SLAVE
            GRAND MASTER ID: 0050c2.fffe.b72df2
    ptp4l[138.803]: master offset          6 s2 freq   +5339 path delay       146
    ptp4l[139.953]: master offset         -2 s2 freq   +5343 path delay       138
    [  140.174315] NET: Registered protocol family 15
    [  140.904029] Initializing XFRM netlink socket
    
    
    ptp_meinberg.pcap.txtptp_multisync.pcap.txt

  • Hi,

    Could you please send the complete log and the PPS capture.

    One recommendation to ensure a fast transition to sync up with a different GMC, it may be better to set step_threshold to 0.00002.

     Best Regards,

    Schuyler