AM263Px MCU+ SDK: Enet Time Synchronization

| AM263Px MCU+ SDK 26.00.00 |

Sub Modules | Data Structures | Enumerations | Macros
Enet Time Synchronization
APIs for Networking modules » APIs for Enet LLD

## Introduction

## Sub Modules
| CPSW CPTS
| ICSSG TimeSync

## Data Structures
struct | EnetTimeSync_setTimestamp
| Timestamp set. More...
struct | EnetTimeSync_TimestampAdj
| Timestamp adjustment. More...
struct | EnetTimeSync_GetEthTimestampInArgs
| Input args for ENET_TIMESYNC_IOCTL_GET_ETH_RX_TIMESTAMP and ENET_TIMESYNC_IOCTL_GET_ETH_TX_TIMESTAMP commands. More...

## Enumerations
enum | EnetTimeSync_Ioctl { ENET_TIMESYNC_IOCTL_GET_VERSION = ENET_TIMESYNC_PUBLIC_IOCTL(0U), ENET_TIMESYNC_IOCTL_PRINT_REGS = ENET_TIMESYNC_PUBLIC_IOCTL(1U), ENET_TIMESYNC_IOCTL_PRINT_STATS = ENET_TIMESYNC_PUBLIC_IOCTL(2U), ENET_TIMESYNC_IOCTL_GET_CURRENT_TIMESTAMP = ENET_TIMESYNC_PUBLIC_IOCTL(3U), ENET_TIMESYNC_IOCTL_SET_TIMESTAMP = ENET_TIMESYNC_PUBLIC_IOCTL(4U), ENET_TIMESYNC_IOCTL_ADJUST_TIMESTAMP = ENET_TIMESYNC_PUBLIC_IOCTL(5U), ENET_TIMESYNC_IOCTL_GET_ETH_RX_TIMESTAMP = ENET_TIMESYNC_PUBLIC_IOCTL(6U), ENET_TIMESYNC_IOCTL_GET_ETH_TX_TIMESTAMP = ENET_TIMESYNC_PUBLIC_IOCTL(7U), ENET_TIMESYNC_IOCTL_RESET = ENET_TIMESYNC_PUBLIC_IOCTL(8U), ENET_TIMESYNC_IOCTL_SET_TIMESTAMP_COMPLETE = ENET_TIMESYNC_PUBLIC_IOCTL(9U) }
| TimeSync module IOCTL commands. More...
enum | EnetTimeSync_MsgType { ENET_TIMESYNC_MESSAGE_SYNC = 0x00U, ENET_TIMESYNC_MESSAGE_DELAY_REQ = 0x01U, ENET_TIMESYNC_MESSAGE_PDELAY_REQ = 0x02U, ENET_TIMESYNC_MESSAGE_PDELAY_RESP = 0x03U, ENET_TIMESYNC_MESSAGE_FOLLOW_UP = 0x08U, ENET_TIMESYNC_MESSAGE_DELAY_RESP = 0x09U, ENET_TIMESYNC_MESSAGE_PDELAY_RESP_FOLLOW_UP = 0x0AU, ENET_TIMESYNC_MESSAGE_ANNOUNCE = 0x0BU, ENET_TIMESYNC_MESSAGE_SIGNALING = 0x0CU, ENET_TIMESYNC_MESSAGE_MANAGEMENT = 0x0DU, ENET_TIMESYNC_MESSAGE_INVALID = -1 }
| TimeSync Ethernet message type. More...
enum | EnetTimeSync_AdjMode { ENET_TIMESYNC_ADJMODE_DISABLE = 0U, ENET_TIMESYNC_ADJMODE_PPM, ENET_TIMESYNC_ADJMODE_PPH }
| TimeSync adjustment mode. More...
enum | EnetTimeSync_AdjDir { ENET_TIMESYNC_ADJDIR_INCREASE = 0U, ENET_TIMESYNC_ADJDIR_DECREASE }
| TimeSync adjustment direction. More...

## Macros
#define | ENET_TIMESYNC_PUBLIC_IOCTL(x)
| Helper macro to create IOCTL commands for TIMESYNC module. More...

## Macro Definition Documentation

## ◆ ENET_TIMESYNC_PUBLIC_IOCTL

#define ENET_TIMESYNC_PUBLIC_IOCTL | ( |  | x | ) |

Value:
(ENET_IOCTL_TYPE_PUBLIC | \
ENET_IOCTL_TIMESYNC_BASE | \
ENET_IOCTL_MIN(x))

Helper macro to create IOCTL commands for TIMESYNC module.

## Enumeration Type Documentation

## ◆ EnetTimeSync_Ioctl

enum EnetTimeSync_Ioctl

TimeSync module IOCTL commands.

Enumerator
ENET_TIMESYNC_IOCTL_GET_VERSION | Get the hardware version of the TimeSync module. IOCTL parameters: inArgs: None outArgs: Enet_Version
ENET_TIMESYNC_IOCTL_PRINT_REGS | Print TimeSync registers. IOCTL parameters: inArgs: None outArgs: None
ENET_TIMESYNC_IOCTL_PRINT_STATS | Print TimeSync event statistics. They could be either hardware or software based statistics. IOCTL parameters: inArgs: None outArgs: None
ENET_TIMESYNC_IOCTL_GET_CURRENT_TIMESTAMP | Get current timestamp. IOCTL parameters: inArgs: None outArgs: uint64_t
ENET_TIMESYNC_IOCTL_SET_TIMESTAMP | Set timestamp value. IOCTL parameters: inArgs: EnetTimeSync_setTimestamp outArgs: None
ENET_TIMESYNC_IOCTL_ADJUST_TIMESTAMP | Adjust the timestamp value. IOCTL parameters: inArgs: EnetTimeSync_TimestampAdj outArgs: None
ENET_TIMESYNC_IOCTL_GET_ETH_RX_TIMESTAMP | Get Ethernet RX timestamp. IOCTL parameters: inArgs: EnetTimeSync_GetEthTimestampInArgs outArgs: uint64_t
ENET_TIMESYNC_IOCTL_GET_ETH_TX_TIMESTAMP | Get Ethernet TX timestamp. For CPSW the driver maintains a pool of the timestamps that are captured by CPTS and gives back the matched entry. But, In case of ICSSG, Driver doesn't maintain any software pool, it returns back the top entry in the queue if it matches the seq id passed. IOCTL parameters: inArgs: EnetTimeSync_GetEthTimestampInArgs outArgs: uint64_t
ENET_TIMESYNC_IOCTL_RESET | Reset TimeSync module. IOCTL parameters: inArgs: None outArgs: None
ENET_TIMESYNC_IOCTL_SET_TIMESTAMP_COMPLETE | ICSSG Set timestamp operation completed. IOCTL parameters: inArgs: None outArgs: None

## ◆ EnetTimeSync_MsgType

enum EnetTimeSync_MsgType

TimeSync Ethernet message type.

Enumerator
ENET_TIMESYNC_MESSAGE_SYNC | TimeSync sync message
ENET_TIMESYNC_MESSAGE_DELAY_REQ | TimeSync delay request message
ENET_TIMESYNC_MESSAGE_PDELAY_REQ | TimeSync Pdelay request message
ENET_TIMESYNC_MESSAGE_PDELAY_RESP | TimeSync Pdelay response message
ENET_TIMESYNC_MESSAGE_FOLLOW_UP | TimeSync follow up message
ENET_TIMESYNC_MESSAGE_DELAY_RESP | TimeSync delay response message
ENET_TIMESYNC_MESSAGE_PDELAY_RESP_FOLLOW_UP | TimeSync Pdelay response followup message
ENET_TIMESYNC_MESSAGE_ANNOUNCE | TimeSync announce message
ENET_TIMESYNC_MESSAGE_SIGNALING | TimeSync signaling message
ENET_TIMESYNC_MESSAGE_MANAGEMENT | TimeSync management message
ENET_TIMESYNC_MESSAGE_INVALID | TimeSync invalid message

## ◆ EnetTimeSync_AdjMode

enum EnetTimeSync_AdjMode

TimeSync adjustment mode.

Enumerator
ENET_TIMESYNC_ADJMODE_DISABLE | Adjustment value is set to zero
ENET_TIMESYNC_ADJMODE_PPM | Adjustment value is calculated for parts per million
ENET_TIMESYNC_ADJMODE_PPH | Adjustment value is calculated for parts per hour

## ◆ EnetTimeSync_AdjDir

enum EnetTimeSync_AdjDir

TimeSync adjustment direction.

Enumerator
ENET_TIMESYNC_ADJDIR_INCREASE | Increase timestamp with adjustment value
ENET_TIMESYNC_ADJDIR_DECREASE | Decrease timestamp with adjustment value

ENET_IOCTL_TYPE_PUBLIC
@ ENET_IOCTL_TYPE_PUBLIC
Definition: enet_ioctl.h:216