AM64x MCU+ SDK  08.02.00

Introduction

Functions

int32_t PN_mapPhaseToProfile (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t portNumber, int32_t phaseNumber, int32_t profileNumberRx, int32_t profileNumberTx)
 API to map a Phase to start of green Profile. More...
 
int32_t PN_setMaxLineRxDelay (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, int32_t maxLineRxDelayValue)
 API to configure the maximum line receive delay. More...
 
int32_t PN_setMaxBridgeDelay (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t maxBridgeDelayValue)
 API to configure the maximum bridge delay. This value comes from the GSD file. More...
 
int32_t PN_setYellowPeriod (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t yellowPeriodTime)
 API to configure the yellow period. More...
 
int32_t PN_setProfile (PRUICSS_HwAttrs const *pruicssHwAttrs, int32_t portNumber, int32_t profileNumber, int32_t rxSoGValue, int32_t txSoGValue)
 API to configure a Profile. In a profile the start of green time in a cycle for Receive (Rx) and Transmit (Tx) is set for a port. More...
 
void PN_setCompensationValue (PRUICSS_HwAttrs const *pruicssHwAttrs, uint16_t compensationValue)
 API to configure the compensation value which is used while computing the forward FSO for a RTC3 frame which has to be forwarded. More...
 
int32_t PN_setRedGuard (PRUICSS_HwAttrs const *pruicssHwAttrs, uint16_t validLowerFrameId, uint16_t validUpperFrameId)
 API to set the Red Guard for the device. More...
 
int32_t PN_setRtc3PortStatus (PRUICSS_HwAttrs const *pruicssHwAttrs, uint8_t portNumber, uint8_t status)
 API to set the RTClass3 port status of a port. More...
 

Function Documentation

◆ PN_mapPhaseToProfile()

int32_t PN_mapPhaseToProfile ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
int32_t  portNumber,
int32_t  phaseNumber,
int32_t  profileNumberRx,
int32_t  profileNumberTx 
)

API to map a Phase to start of green Profile.

A phase can be mapped to different profiles for Receive (Rx) and Transmit (Tx) on a port.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]portNumberPort on which phase to profile mapping has to be done
ICSS_EMAC_PORT_1 (1)
ICSS_EMAC_PORT_2 (2)
[in]phaseNumberIRT Phase Number
Valid values are from 1 to 16
[in]profileNumberRxProfile number mapped for Receive
Valid values are from 1 to 5
[in]profileNumberTxProfile number mapped for Transmit
Valid values are from 1 to 5
Return values
0on success

◆ PN_setMaxLineRxDelay()

int32_t PN_setMaxLineRxDelay ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
uint8_t  portNumber,
int32_t  maxLineRxDelayValue 
)

API to configure the maximum line receive delay.

This value is provided by the PLC when it establishes connection with the device.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]portNumberPort for which receive line delay is configured
ICSS_EMAC_PORT_1 (1)
ICSS_EMAC_PORT_2 (2)
[in]maxLineRxDelayValueLine delay as seen by the PLC at a port. This value is computed by the PLC/Engineering tool.
Return values
0on success

◆ PN_setMaxBridgeDelay()

int32_t PN_setMaxBridgeDelay ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
int32_t  maxBridgeDelayValue 
)

API to configure the maximum bridge delay. This value comes from the GSD file.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]maxBridgeDelayValue
Valid value for our device is 2900ns
This value is defined in the GSD
Return values
0on success

◆ PN_setYellowPeriod()

int32_t PN_setYellowPeriod ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
int32_t  yellowPeriodTime 
)

API to configure the yellow period.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]yellowPeriodTimeLength of the yellow period
Valid value is 125 us as our device does not support fragmentation
Return values
0on success

◆ PN_setProfile()

int32_t PN_setProfile ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
int32_t  portNumber,
int32_t  profileNumber,
int32_t  rxSoGValue,
int32_t  txSoGValue 
)

API to configure a Profile. In a profile the start of green time in a cycle for Receive (Rx) and Transmit (Tx) is set for a port.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]portNumberPort for which a profile is configured
PORT1 (1)
PORT2 (2)
[in]profileNumberFive profiles can be defined for a port
Valid values are from 1 to 5
[in]rxSoGValueStart of Green value for receive at the port
Valid value can range from 0 to the max of cycle time
[in]txSoGValueStart of Green value for transmit at the port
Valid value can range from 0 to the max of cycle time
Return values
0on success

◆ PN_setCompensationValue()

void PN_setCompensationValue ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
uint16_t  compensationValue 
)

API to configure the compensation value which is used while computing the forward FSO for a RTC3 frame which has to be forwarded.

Parameters
[in]compensationValuecompensation for the jitter Valid range is from 0 to 100
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses

◆ PN_setRedGuard()

int32_t PN_setRedGuard ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
uint16_t  validLowerFrameId,
uint16_t  validUpperFrameId 
)

API to set the Red Guard for the device.

Received RTC3 frames are dropped if their FID doesn't fall in the range set by the Red Guard.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]validLowerFrameIdLower value of RTC3 FID for the Red Guard
Valid range is 0x0100 to 0x0FFF
[in]validUpperFrameId
Valid range is 0x0100 to 0x0FFF and equal or greater then validLowerFrameId
Return values
0on success

◆ PN_setRtc3PortStatus()

int32_t PN_setRtc3PortStatus ( PRUICSS_HwAttrs const *  pruicssHwAttrs,
uint8_t  portNumber,
uint8_t  status 
)

API to set the RTClass3 port status of a port.

If the status of a port is set to UP or RUN then firmware internally enables Phase Management on that port.

Parameters
[in]pruicssHwAttrsPRUICSS HW Attributes for base addresses
[in]portNumberPort whose status has to be configured
ICSS_EMAC_PORT_1 (1)
ICSS_EMAC_PORT_2 (2)
[in]statusThere are three valid values of the RTClass3 port status
OFF
UP
RUN
Return values
0on success