Commit 132009c7 authored by Adam Wujek's avatar Adam Wujek

shell/ptp: add commands to change rate of sending SYNC and DELAY_REQ frames

This commit requires also a proper commit from ppsi
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 0559d128
......@@ -2266,7 +2266,8 @@ the build of WRPC.
(requires external 10MHz and 1-PPS reference), Master or Slave. After
setting the mode, \texttt{ptp start} must be re-issued \\
\code{ptp <prio1|prio2|domain|class}\\\code{|accuracy|allan|tsource> <val>}
\code{ptp <prio1|prio2|domain|class}\\\code{|accuracy|allan|tsource}\\
\code{|sync\_int|delay\_req\_int> <val>}
& sets various parametes of PTP. For details see below.
Use these subcommands with caution. Setting the mode with
\texttt{ptp} command may affect the already set parameters using
......@@ -2280,6 +2281,16 @@ the build of WRPC.
\code{ptp accuracy <1-255>} & sets \textit{clock accuracy} used by PTP \\
\code{ptp allan <0-65535>} & sets \textit{clock allan variance} used by PTP \\
\code{ptp tsource <0-255>} & sets \textit{time source} used by PTP \\
\code{ptp sync\_int <n>} & sets logarithm to the base 2 of the mean interval
of \textit{sync message transmission}
used by PTP.
Available if \texttt{CONFIG\_INSITU\_CALIB} is
set. \\
\code{ptp delay\_req\_int <n>} & sets logarithm to the base 2 of the mean
interval of \textit{delay request message
transmission} used by PTP.
Available if \texttt{CONFIG\_INSITU\_CALIB}
is set. \\
\code{ptp start} & starts WR PTP daemon \\
......
......@@ -59,6 +59,10 @@ struct subcmd {
{"tsource", wrc_ptp_set_time_source, USE_CMD_PARAM},
#endif /* CONFIG_PTP_OPT_OVERWRITE_ATTRIBUTES */
#endif /* CONFIG_CMD_PTP_ADV */
#ifdef CONFIG_INSITU_CALIB
{"sync_int", wrc_ptp_set_sync_interval, USE_CMD_PARAM},
{"delay_req_int", wrc_ptp_set_delay_req_interval, USE_CMD_PARAM},
#endif /* CONFIG_INSITU_CALIB */
#ifdef CONFIG_ABSCAL
{"abscal", wrc_ptp_set_mode, WRC_MODE_ABSCAL},
#endif
......@@ -96,6 +100,10 @@ static int cmd_ptp(const char *args[])
wrc_ptp_set_time_source(USE_CMD_PARAM);
}
}
if (HAS_INSITU_CALIB) {
wrc_ptp_get_sync_interval();
wrc_ptp_get_delay_req_interval();
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment