This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:linuxdsp:docs:linux_yocto_distrubution_and_applications:linuxptp [10 Jul 2020 11:18] – [More information] Sunny Feng | resources:tools-software:linuxdsp:docs:linux_yocto_distribution_and_applications:linuxptp [22 Sep 2020 11:14] (current) – [Device tree configuration] Sunny Feng | ||
---|---|---|---|
Line 16: | Line 16: | ||
< | < | ||
vim build/ | vim build/ | ||
- | IMAGE_INSTALL_append = " | + | IMAGE_INSTALL_append = " linuxptp" |
</ | </ | ||
Line 46: | Line 46: | ||
\\ | \\ | ||
==== Device tree configuration ==== | ==== Device tree configuration ==== | ||
- | The timestamps that are the basis of PTP can be acquired with greater accuracy when they are captured by the ethernet PHY hardware. The RMII PHY interface | + | The timestamps that are the basis of PTP can be acquired with greater accuracy when they are captured by the ethernet PHY hardware. The PHY interface |
- | The phy-mode can be changed to " | + | |
+ | The phy-mode | ||
<WRAP info> | <WRAP info> | ||
... : ellipsis, means other properties in EMAC0 node stay the same\\ | ... : ellipsis, means other properties in EMAC0 node stay the same\\ | ||
Line 54: | Line 55: | ||
</ | </ | ||
+ | Run " | ||
< | < | ||
$ vim arch/ | $ vim arch/ | ||
Line 64: | Line 66: | ||
</ | </ | ||
- | Run "// | + | Run "// |
+ | As to the linuxptp example needs the ethernet up, so users should use the ramboot rather than nfsboot. Run "// | ||
\\ | \\ | ||
===== Example ===== | ===== Example ===== | ||
Line 74: | Line 77: | ||
Two ADSP-SC5xx boards are required. One board act as a master, and the other act as a slave. The two boards are connected by their respective EMAC0 ports using a standard crossover network cable. | Two ADSP-SC5xx boards are required. One board act as a master, and the other act as a slave. The two boards are connected by their respective EMAC0 ports using a standard crossover network cable. | ||
- | **2) Enable PTP in U-Boot** | + | **2) Master' |
- | \\ | + | |
- | Add " | + | |
- | < | + | |
- | $ set bootargs root=/ | + | |
- | </ | + | |
- | + | ||
- | **3) Master' | + | |
\\ | \\ | ||
In order to make the master' | In order to make the master' | ||
Line 88: | Line 84: | ||
</ | </ | ||
- | **4) Master' | + | **3) Master' |
\\ | \\ | ||
Reset IP address after linux boot up. | Reset IP address after linux boot up. | ||
Line 108: | Line 104: | ||
# testptp -s | # testptp -s | ||
set time okay | set time okay | ||
- | # hwstamp_ctl -i eth0 -r 6 -t 1 | + | # hwstamp_ctl -i eth0 -r 6 -t 1 |
tx_type 1 | tx_type 1 | ||
rx_filter 6 | rx_filter 6 | ||
- | # ptp4l -i eth0 & | + | </ |
+ | Change tx_timestamp_timeout to 100 | ||
+ | < | ||
+ | # vi / | ||
+ | -tx_timestamp_timeout | ||
+ | +tx_timestamp_timeout | ||
+ | # | ||
+ | # ptp4l -i eth0 -f / | ||
# date | # date | ||
Fri Jan 1 13:30:51 UTC 2010 | Fri Jan 1 13:30:51 UTC 2010 | ||
Line 118: | Line 121: | ||
=== 2) Slave === | === 2) Slave === | ||
< | < | ||
- | # hwstamp_ctl -i eth0 -r 6 -t 1 | + | # hwstamp_ctl -i eth0 -r 6 -t 1 |
tx_type 1 | tx_type 1 | ||
rx_filter 6 | rx_filter 6 | ||
- | # ptp4l -i eth0 -s & | + | # ptp4l -i eth0 -s & |
- | # date | + | # date |
Mon Jan 1 00:02:24 UTC 2007 | Mon Jan 1 00:02:24 UTC 2007 | ||
- | # phc2sys -s /dev/ptp0 -O 0 & | + | # phc2sys -s /dev/ptp0 -O 0 & |
- | # date | + | # date |
Mon Jan 1 00:02:24 UTC 2007 | Mon Jan 1 00:02:24 UTC 2007 | ||
... | ... | ||
- | # date | + | # date |
Fri Jan 1 13:30:58 UTC 2010 | Fri Jan 1 13:30:58 UTC 2010 | ||
Date on the slave board is 2007.1.1-00: | Date on the slave board is 2007.1.1-00: | ||
Line 142: | Line 145: | ||
\\ | \\ | ||
---- | ---- | ||
- | **Back to** [[resources/tools-software/linuxdsp/docs/ | + | **Back to** [[resources:tools-software:linuxdsp:docs: |