Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
export INTERFACE=enp1s0

#Init PTP
ptp4l -P2Hi $INTERFACE -f gPTP.cfg --step_threshold=1 -m &
pmc -u -b 0 -t 1 "SET GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0"
sleep 10
phc2sys -s enp1s0 -O 0 -c CLOCK_REALTIME --step_threshold=1 --transportSpecific=1 -w -m --first_step_threshold=0.0 &
sleep 10

pkill ptp4l 
pkill phc2sys

#Configure qdisc before start CC-Link IE TSN Master application. 
tc qdisc del dev $INTERFACE parent root handle 100 taprio
sleep 2
tc qdisc add dev $INTERFACE clsact &> /dev/null
tc filter del dev $INTERFACE egress
tc filter add dev $INTERFACE egress protocol 0x890f flower verbose action skbedit priority 1
tc filter add dev $INTERFACE egress protocol 0x88f7 flower verbose action skbedit priority 2
BASE=$(date +%s%N)
echo $BASE
# Refer 	appl/goal_ccl_ie_tsn/03_master_ct/goal_appl.c TSLT and modify 
tc qdisc replace dev $INTERFACE parent root handle 100 taprio num_tc 4 map 2 0 1 3 3 3 3 3 queues 1@0 1@1 1@2 1@3 1@3 1@3 1@3 1@3 base-time $BASE sched-entry S 01 499000 sched-entry S 0 1000 sched-entry S 02 19000 sched-entry S 0 1000 sched-entry S fc 409000 sched-entry S 0 1000 flags 0x2 txtime-delay 0
sleep 2

#Set CC-Link IE TSN Master IP 
ifconfig $INTERFACE 192.168.3.250

In appl/goal_ccl_ie_tsn/03_master_ct/goal_appl.c , adjust the following settings:

...