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.

TMDX654IDKEVM: TMDX654IDKEVM: Clock jump of PTP device for ICSSG #2

Part Number: TMDX654IDKEVM

Hello,

the clock jump issue occurred during real usage of our system. The clock jump occurs again in 16777 seconds in case when was the link state set down and up before.
There is no time synchronization and no manipulation with other interfaces. See reproduction steps bellow and exact log for that.

HW
TMDX654IDKEVM PROC062A with PG2.0

SW
SDK PROCESSOR-SDK-LINUX-RT-AM65X_08.06.00.47
 - tisdk-default-image-am65xx-evm.wic.xz
 - with phc_ctl tool from linuxptp-3.1.1 compiled on IDK

Reproduction steps
1. Fresh boot with already prepared phc_ctl tool
2. Set the interface clock near to 16777 - e.g. 16750
3. Set interface link down
4. Set interface link up
5. Check the interface clock - after 16777 the clock jumps back as in related issue.

LOG

Arago 2021.09 am65xx-evm ttyS2

am65xx-evm login: root
root@am65xx-evm:~# cd linuxptp-3.1.1/
root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 set 16750
phc_ctl[39.085]: set clock time to 16750.000000000 or Thu Jan  1 04:39:10 1970

root@am65xx-evm:~/linuxptp-3.1.1# ip l set eth1 down
[   44.625597] remoteproc remoteproc9: stopped remote processor b10a000.txpru
[   44.625632] remoteproc remoteproc8: stopped remote processor b104000.rtu
[   44.625645] remoteproc remoteproc7: stopped remote processor b134000.pru
[   44.660618] net eth1: stopped
root@am65xx-evm:~/linuxptp-3.1.1# ip l set eth1 up
[   48.544972] remoteproc remoteproc7: powering up b134000.pru
[   48.545197] remoteproc remoteproc7: Booting fw image ti-pruss/am65x-sr2-pru0-prueth-fw.elf, size 38224
[   48.545227] remoteproc remoteproc7: unsupported resource 5
[   48.545258] remoteproc remoteproc7: remote processor b134000.pru is now up
[   48.545292] remoteproc remoteproc8: powering up b104000.rtu
root@am65xx-evm:~/linuxptp-3.1.1# [   48.545411] remoteproc remoteproc8: Booting fw image ti-pruss/am65x-sr2-rtu0-prueth-fw.elf, size 30872
[   48.545444] remoteproc remoteproc8: remote processor b104000.rtu is now up
[   48.545469] remoteproc remoteproc9: powering up b10a000.txpru
[   48.545605] remoteproc remoteproc9: Booting fw image ti-pruss/am65x-sr2-txpru0-prueth-fw.elf, size 37328
[   48.545645] remoteproc remoteproc9: remote processor b10a000.txpru is now up
[   48.551834] net eth1: started
./phc_ctl eth1 get
phc_ctl[58.413]: clock time is 16769.329253976 or Thu Jan  1 04:39:29 1970

root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
phc_ctl[71.229]: clock time is 8393.537336876 or Thu Jan  1 02:19:53 1970

Regards,
Lukas

  • Hello Lukas,

    To confirm, the clock jump is ONLY seen if there is a link down / link up?

    Can you confirm which version of the AM65x PRU Ethernet firmware you are using?

    I am sending your thread to another team member to drive the next steps here.

    Regards,

    Nick

  • Also, for the PRU_ICSSG instance with the link down / link up, what is the link status of the other Ethernet port connected to the other slice within that PRU_ICSSG?

  • Hello Nick,

    To confirm, the clock jump is ONLY seen if there is a link down / link up?

    Yes it is seen only when is there down and up. The down and up exactly means interface administratively down and up, how it is in provided Log, see "ip l set eth1 down"

    Can you confirm which version of the AM65x PRU Ethernet firmware you are using?

     Firmware version is default from SDK PROCESSOR-SDK-LINUX-RT-AM65X_08.06.00.47 and tisdk-default-image-am65xx-evm.wic.xz

    Also, for the PRU_ICSSG instance with the link down / link up, what is the link status of the other Ethernet port connected to the other slice within that PRU_ICSSG?

    The port on other slice that PRU_ICSSG in this case "eth2" was administratively up from boot. There was no manipulation with nothing other after boot than is shown in Log and no connected ethernet cables in ports at all time.

    Regards,
    Lukas

  • Hi Lukas,

    I tested with SDK 8.06 and it is working as expected on my end.

    Here are attached logs:

    You 2/6/2023 2:13 PM • KEY - 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
    You 2/6/2023 2:14 PM • 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
    2/7/2023
    You 2/7/2023 10:24 AM • aparna key -> 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 
    You 2/7/2023 1:40 PM • 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
    You 2/7/2023 5:16 PM • https://www.electronics-notes.com/articles/connectivity/ethernet-ieee-802-3/what-is-ethernet-switch-how-it-works.php
    https://www.oreilly.com/library/view/ethernet-switches/9781449367299/ch01.html
    2/9/2023
    You 2/9/2023 9:57 AM • https://www.tensorflow.org/tutorials/keras/classification
    You 2/9/2023 1:45 PM • https://ti-pass.ext.ti.com/cgi-bin/login/login.pl
    2/14/2023
    You 2/14/2023 1:39 PM • 
    PROCESSOR-SDK-AM64X Software development kit (SDK) | TI.com
    2/22/2023
    You 2/22/2023 11:19 AM • 
    2/24/2023
    You 2/24/2023 9:56 AM • 
    2/27/2023
    You 2/27/2023 3:14 PM • https://towardsdatascience.com/how-to-train-a-bert-model-from-scratch-72cfce554fc6
    3/3/2023
    You 3/3/2023 9:58 AM • 
    (1) AM6548: RTI error to cause MDIO stuck - Processors forum - Processors - TI E2E support forums
    You 3/3/2023 12:21 PM • 
    3/6/2023
    You 3/6/2023 2:22 PM • https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM64X/08.05.00.21
    You 3/6/2023 2:24 PM • 
    (5) SK-AM64: SK-AM64 Top Level Makefile fails building firmware - Processors forum - Processors - TI E2E support forums
    You 3/6/2023 2:25 PM • chmod +x ./ti-processor-sdk-linux-am64xx-evm-08.05.00.21-Linux-x86-Install.bin
    ./ti-processor-sdk-linux-am64xx-evm-08.05.00.21-Linux-x86-Install.bin
    You 3/6/2023 3:01 PM • board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16
    3/7/2023
    You 3/7/2023 10:42 AM • e943f94b78dd (HEAD) MDIO - Errata i2329 Software Workaround patch
    You 3/7/2023 1:29 PM • 
    (4) SK-AM64: SK-AM64 Top Level Makefile fails building firmware - Processors forum - Processors - TI E2E support forums
    3/8/2023
    You 3/8/2023 3:03 PM • 
    3/9/2023
    You 3/9/2023 10:30 AM • 
    (+) SK-AM64: SK-AM64 Top Level Makefile fails building firmware - Processors forum - Processors - TI E2E support forums
    3/16/2023
    You 3/16/2023 4:37 PM • 
    4/3/2023
    You 4/3/2023 1:24 PM • https://bootcamp.uxdesign.cc/a-step-by-step-guide-to-building-a-chatbot-based-on-your-own-documents-with-gpt-2d550534eea5
    4/5/2023
    You 4/5/2023 5:51 PM • 
    Index of /ubuntu/pool/main/o/openssl
    4/12/2023
    You 4/12/2023 10:58 AM • 
    For repo installation over windows : Error installing Jupyter & pywinpty (Python) - Stack Overflow
    4/21/2023
    You 4/21/2023 12:21 PM • main_rgmii1_pins_default: main-rgmii1-pins-default {
    pinctrl-single,pins = <
    AM62X_IOPAD(0x14c, PIN_INPUT, 0) /* (AB17) RGMII1_RD0 */
    AM62X_IOPAD(0x150, PIN_INPUT, 0) /* (AC17) RGMII1_RD1 */
    AM62X_IOPAD(0x154, PIN_INPUT, 0) /* (AB16) RGMII1_RD2 */
    AM62X_IOPAD(0x158, PIN_INPUT, 0) /* (AA15) RGMII1_RD3 */
    AM62X_IOPAD(0x148, PIN_INPUT, 0) /* (AD17) RGMII1_RXC */
    AM62X_IOPAD(0x144, PIN_INPUT, 0) /* (AE17) RGMII1_RX_CTL */
    AM62X_IOPAD(0x134, PIN_OUTPUT, 0) /* (AE20) RGMII1_TD0 */
    AM62X_IOPAD(0x138, PIN_OUTPUT, 0) /* (AD20) RGMII1_TD1 */
    AM62X_IOPAD(0x13c, PIN_OUTPUT, 0) /* (AE18) RGMII1_TD2 */
    AM62X_IOPAD(0x140, PIN_OUTPUT, 0) /* (AD18) RGMII1_TD3 */
    AM62X_IOPAD(0x130, PIN_OUTPUT, 0) /* (AE19) RGMII1_TXC */
    AM62X_IOPAD(0x12c, PIN_OUTPUT, 0) /* (AD19) RGMII1_TX_CTL */
    >;
    };
    
    You 4/21/2023 12:23 PM • &cpsw3g {
    pinctrl-names = "default";
    pinctrl-0 = <&main_mdio1_pins_default
    &main_rgmii1_pins_default
    &main_rgmii2_pins_default>;
    };
    
    &cpsw_port1 {
    phy-mode = "rgmii-rxid";
    phy-handle = <&cpsw3g_phy0>;
    };
    
    &cpsw_port2 {
    phy-mode = "rgmii-rxid";
    phy-handle = <&cpsw3g_phy1>;
    };
    
    5/11/2023
    You 5/11/2023 12:11 PM • 
    Today
    You 6/9/2023 2:27 PM • oot@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 set 16760
    phc_ctl[161.974]: set clock time to 16760.000000000 or Thu Jan 1 04:39:20 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get 
    phc_ctl[170.829]: clock time is 16768.855802420 or Thu Jan 1 04:39:28 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[172.605]: clock time is 16770.631823180 or Thu Jan 1 04:39:30 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[174.445]: clock time is 16772.471776468 or Thu Jan 1 04:39:32 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[175.854]: clock time is 16773.881521884 or Thu Jan 1 04:39:33 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[178.037]: clock time is 16776.063813680 or Thu Jan 1 04:39:36 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[179.421]: clock time is 16777.447775196 or Thu Jan 1 04:39:37 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[180.937]: clock time is 16778.963767364 or Thu Jan 1 04:39:38 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[182.517]: clock time is 16780.543771188 or Thu Jan 1 04:39:40 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ifconfig eth1 down
    [ 194.918107] remoteproc remoteproc15: stopped remote processor b20a000.txpru
    [ 194.925134] remoteproc remoteproc14: stopped remote processor b204000.rtu
    [ 194.931996] remoteproc remoteproc13: stopped remote processor b234000.pru
    [ 194.941524] net eth1: stopped
    root@am65xx-evm:~/linuxptp-3.1.1# ifconfig eth1 up 
    [ 200.590608] remoteproc remoteproc13: powering up b234000.pru
    [ 200.596578] remoteproc remoteproc13: Booting fw image ti-pruss/am65x-sr2-pru0-prueth-fw.elf, size 38224
    [ 200.606123] remoteproc remoteproc13: unsupported resource 5
    [ 200.611773] remoteproc remoteproc13: remote processor b234000.pru is now up
    [ 200.618794] remoteproc remoteproc14: powering up b204000.rtu
    [ 200.624650] remoteproc remoteproc14: Booting fw image ti-pruss/am65x-sr2-rtu0-prueth-fw.elf, size 30872
    [ 200.634085] remoteproc remoteproc14: remote processor b204000.rtu is now up
    [ 200.641083] remoteproc remoteproc15: powering up b20a000.txpru
    [ 200.647079] remoteproc remoteproc15: Booting fw image ti-pruss/am65x-sr2-txpru0-prueth-fw.elf, size 37328
    [ 200.656739] remoteproc remoteproc15: remote processor b20a000.txpru is now up
    [ 200.665559] net eth1: started
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 set 16760
    phc_ctl[220.298]: set clock time to 16760.000000000 or Thu Jan 1 04:39:20 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[223.849]: clock time is 16763.551824396 or Thu Jan 1 04:39:23 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[225.603]: clock time is 16765.306236472 or Thu Jan 1 04:39:25 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[227.057]: clock time is 16766.759881892 or Thu Jan 1 04:39:26 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[228.489]: clock time is 16768.191869524 or Thu Jan 1 04:39:28 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[229.737]: clock time is 16769.439666056 or Thu Jan 1 04:39:29 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[231.529]: clock time is 16771.231812016 or Thu Jan 1 04:39:31 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[232.345]: clock time is 16772.047846012 or Thu Jan 1 04:39:32 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[233.305]: clock time is 16773.007835952 or Thu Jan 1 04:39:33 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[234.089]: clock time is 16773.791784552 or Thu Jan 1 04:39:33 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[234.889]: clock time is 16774.591852684 or Thu Jan 1 04:39:34 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[235.617]: clock time is 16775.319812796 or Thu Jan 1 04:39:35 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[237.769]: clock time is 16777.471872732 or Thu Jan 1 04:39:37 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[238.809]: clock time is 16778.511876260 or Thu Jan 1 04:39:38 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[241.337]: clock time is 16781.039858528 or Thu Jan 1 04:39:41 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# ./phc_ctl eth1 get
    phc_ctl[246.793]: clock time is 16786.495779752 or Thu Jan 1 04:39:46 1970
    
    root@am65xx-evm:~/linuxptp-3.1.1# 
    
    

    Thanks and Regards,

    Rimika

  • Hello Rimika,

    I see in your log you used different order of reproduction steps. I expect that it is a reason why it did not occurs.

    Please reproduce it the same way. First set the clock, then do down/up and after that do only clock check.

    Regards,
    Lukas

  • Hi Lukas,

    I am able to reproduce the error following the steps you mentioned, i'll report the issue to the dev team.

    Thanks and Regards,

    Rimika