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: PRU Ethernet latencies

Part Number: TMDX654IDKEVM

Ethernet ports shall provide same (or defined) time at the same moment or there should be a way to set their offset to 0 or desired value. IDK reboot changes the value. See steps below

Reproduction steps:

Create SD card for AM65x industrial development kit (IDK) http://www.ti.com/tool/TMDX654IDKEVM :
1) Run Ubuntu 18.04.
2) Install EA SDK 6.1 to the default location by running:
./EA ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.04-Linux-x86-Install.bin
3) Insert SD card.
4) Run to create SD card script:
sudo ~/ti-processor-sdk-linux-rt-am65xx-evm-06.01.00.04/bin/create-sdcard.sh
5) choose SD card by size from the list.
6) select 2 partitions
7) select y to "Proceed anyway?" question
8) select y to "Would you like to continue?" question
9) select 1) Install pre-built images from SDK
10) select 1:tisdk-rootfs-image-am65xx-evm.tar.xz
Unpack test applications and scripts to the SD card:
11) Unpack attached file compareDirections.tar.xz the to the SD card
sudo tar xf compareDirections.tar.xz -C /media/$USER/rootfs/home/root
Setup AM65x IDK hardware image:
12) See attached image compareDirectionsSetup.jpg of the setup.
13) Insert SD card.
14) Connect two PRU ethernet interfaces on the upper board by 2 m cable.
14) Connect usb cable to UART.
16) connect power cable.
17) Switch on the IDK.
Run test scripts and applications
18) Open USB console.
19) Login as root.
20) Run:
cd compareDirections
21) Send frame from eth1 to eth3 and back and compare delays:
./compareDirections.sh eth1 eth3
You can see that the PRU ethernets has the time changed by the offset:
eth1 -> eth3 [ns]: 532
eth3 -> eth1 [ns]: 392
Average [ns]: 462.0
Difference [ns]: 140
Difference should be around 0 for PRU Ethernet with same time.
If it try it again I will get similar results:
eth1 -> eth3 [ns]: 532
eth3 -> eth1 [ns]: 396
Average [ns]: 464.0
Difference [ns]: 136
Difference should be around 0 for PRU Ethernet with same time.
After IDK reboot you will get different values:
eth1 -> eth3 [ns]: 565
eth3 -> eth1 [ns]: 359
Average [ns]: 462.0
Difference [ns]: 206
Difference should be around 0 for PRU Ethernet with same time.
  • Hello Marek,

    FYI, I probably will not have access to hardware to reproduce your results until next week.

    Regards,

    Nick

  • Hello Marek,

    Update: I still do not have access to hardware, but I am working on getting some feedback for you soon.

    Regards,

    Nick

  • Hello Marek,

    Note that each ICSSG port has its own IEP. Each IEP will be initialized at a different time during boot. That means there will be some time offset between each IEP counter value. We suspect that the reason you see a difference in latency measured is because the IEP counters are not in sync - you want user space to sync those clocks.

    We see 0ns difference in latency if we modify the sendrec.c file to use a software timestamp.

    Regards,

    Nick

  • Hello Marek,

    Just checking that your issue was actually resolved here.

    FYI, the clocks can be synced with a command like:
    phc2sys -m -q -s /dev/ptp2 -c /dev/ptp3 -O 0 -l 5 -R 10 -c /dev/ptp1
    dev/ptp2 is master
    /dev/ptp3 and /dev/ptp1 are slave (sync rate 10Hz)


    Regards,

    Nick

  • Hello

    unfortunately this did not synchronize our PRUs.

    runtest.sh must be put into the same directory as compareDirections.sh

    it does one measurement before running phc2sys and then 10 measurements for 2 combinations of PTP devices ({ptp2, ptp4, ptp6} and {ptp3, ptp5, ptp7}) and then reboots

    runtest.sh, logs with our measurements and output from phc2sys are attached.

    Best regards,

    Marek Vonka

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/pru-sync-test-logs.7z

  • phc2sys can sync only one slave.
    To sync timestamps of eth1, eth3 and eth5 in 6.1.0.8 SDK:
    phc2sys -m -q -s /dev/ptp2 -c /dev/ptp4 -O 0 -l 5 -R 10
    phc2sys -m -q -s /dev/ptp2 -c /dev/ptp6 -O 0 -l 5 -R 10