Commit Graph

3 Commits (bf0a644b991b42aaa56b88e2f2180b7d81318c5c)

Author SHA1 Message Date
Vincent Cheng d4b97f497c Decouple servo state from automotive profile.
The logic for the Automotive Profile added a message interval update
mechanism that triggers whenever the servo enters the "stable locked"
state.  This SERVO_LOCKED_STABLE state is active when the
configuration option servo_offset_threshold is non-zero and
servo_offset_threshold criteria is satisfied.

However, in general, the state of the servo can and should be
independent of any profile specific optional behavior.  In particular,
the "stable locked" state will be used in the future to trigger other
kinds useful logic.  For example, an upcoming write phase mode feature
would like to take advantage of the SERVO_LOCKED_STABLE state to
trigger its activation.

This patch introduces a proper configuration option to enable
transmission of the message interval request that is specific to the
Automotive Profile.

Signed-off-by: Vincent Cheng <vincent.cheng.xh@renesas.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-05-24 11:42:49 -07:00
Vedang Patel 3f5f5653d7 port: Add interval update mechanism.
This commit adds functionality to increase the sync and pdelay request
intervals once gptp synchronization has been achieved. This is useful
while running Automotive Profile where the network is usually static.

Here, we are assuming that the gPTP synchronization is achieved whenever
the last 'n' offsets calculated using the Sync messages are below a
certain threshold. Both, the number of offsets to consider and the offset
threshold are configurable.

In order to support the interval update, a new clock servo state
CLOCK_SERVO_STABLE has been added. The clock will transition to this
state whenever the above condition is satisfied. When this transition
occurs, the slave will send an "interval request" signaling message
asking the master to change the sync interval. It will also update the
pdelay request interval locally.

Four new config options have been added to provide this functionality:

- servo_offset_threshold: All the offset values being considered should
  be below this value.
- servo_num_offset_values: number of previously received offset values
  to consider.
- operLogSyncInterval: slave will ask the master to switch to this
  interval for sending sync messages when the offset stabilizes.
- operLogPdelayReqInterval: the slave will set this interval for pdelay
  request messages when the offset stabilizes.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:48 -07:00
Vedang Patel 4d251d8358 Add example configuration for Automotive Profile.
This commit adds example for configuring master and slave devices that
support features from the Automotive Profile.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2018-10-04 19:38:19 -07:00