XMC Peripheral Library for XMC4000 Family: ETH_MAC

XMC Peripheral Library for XMC4000 Family

XMC Peripheral Library for XMC4000 Family  2.1.16

Data Structures

struct  XMC_ETH_MAC_DMA_DESC_t
 
union  XMC_ETH_MAC_PORT_CTRL_t
 
struct  XMC_ETH_MAC_t
 
struct  XMC_ETH_MAC_TIME_t
 

Macros

#define ETH_MAC_DMA_RDES0_AFM   (0x40000000U)
 
#define ETH_MAC_DMA_RDES0_CE   (0x00000002U)
 
#define ETH_MAC_DMA_RDES0_DBE   (0x00000004U)
 
#define ETH_MAC_DMA_RDES0_DE   (0x00004000U)
 
#define ETH_MAC_DMA_RDES0_ES   (0x00008000U)
 
#define ETH_MAC_DMA_RDES0_ESA   (0x00000001U)
 
#define ETH_MAC_DMA_RDES0_FL   (0x3FFF0000U)
 
#define ETH_MAC_DMA_RDES0_FS   (0x00000200U)
 
#define ETH_MAC_DMA_RDES0_FT   (0x00000020U)
 
#define ETH_MAC_DMA_RDES0_LC   (0x00000040U)
 
#define ETH_MAC_DMA_RDES0_LE   (0x00001000U)
 
#define ETH_MAC_DMA_RDES0_LS   (0x00000100U)
 
#define ETH_MAC_DMA_RDES0_OE   (0x00000800U)
 
#define ETH_MAC_DMA_RDES0_OWN   (0x80000000U)
 
#define ETH_MAC_DMA_RDES0_RE   (0x00000008U)
 
#define ETH_MAC_DMA_RDES0_RWT   (0x00000010U)
 
#define ETH_MAC_DMA_RDES0_SAF   (0x00002000U)
 
#define ETH_MAC_DMA_RDES0_TSA   (0x00000080U)
 
#define ETH_MAC_DMA_RDES0_VLAN   (0x00000400U)
 
#define ETH_MAC_DMA_TDES0_CC   (0x00000078U)
 
#define ETH_MAC_DMA_TDES0_CIC   (0x00C00000U)
 
#define ETH_MAC_DMA_TDES0_DB   (0x00000001U)
 
#define ETH_MAC_DMA_TDES0_DC   (0x08000000U)
 
#define ETH_MAC_DMA_TDES0_DP   (0x04000000U)
 
#define ETH_MAC_DMA_TDES0_EC   (0x00000100U)
 
#define ETH_MAC_DMA_TDES0_ED   (0x00000004U)
 
#define ETH_MAC_DMA_TDES0_ES   (0x00008000U)
 
#define ETH_MAC_DMA_TDES0_FF   (0x00002000U)
 
#define ETH_MAC_DMA_TDES0_FS   (0x10000000U)
 
#define ETH_MAC_DMA_TDES0_IC   (0x40000000U)
 
#define ETH_MAC_DMA_TDES0_IHE   (0x00010000U)
 
#define ETH_MAC_DMA_TDES0_IPE   (0x00001000U)
 
#define ETH_MAC_DMA_TDES0_JT   (0x00004000U)
 
#define ETH_MAC_DMA_TDES0_LC   (0x00000200U)
 
#define ETH_MAC_DMA_TDES0_LOC   (0x00000800U)
 
#define ETH_MAC_DMA_TDES0_LS   (0x20000000U)
 
#define ETH_MAC_DMA_TDES0_NC   (0x00000400U)
 
#define ETH_MAC_DMA_TDES0_OWN   (0x80000000U)
 
#define ETH_MAC_DMA_TDES0_TCH   (0x00100000U)
 
#define ETH_MAC_DMA_TDES0_TER   (0x00200000U)
 
#define ETH_MAC_DMA_TDES0_TTSE   (0x02000000U)
 
#define ETH_MAC_DMA_TDES0_TTSS   (0x00020000U)
 
#define ETH_MAC_DMA_TDES0_UF   (0x00000002U)
 
#define ETH_MAC_DMA_TDES0_VF   (0x00000080U)
 
#define XMC_ETH_MAC_BUF_SIZE   (1524)
 
#define XMC_ETH_MAC_PHY_MAX_RETRIES   (0xffffUL)
 
#define XMC_ETH_WAKEUP_REGISTER_LENGTH   (8U)
 

Enumerations

Functions

void XMC_ETH_MAC_AdjustPTPClock (XMC_ETH_MAC_t *const eth_mac, uint32_t correction)
 
void XMC_ETH_MAC_ClearEventStatus (XMC_ETH_MAC_t *const eth_mac, uint32_t event)
 
void XMC_ETH_MAC_Disable (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableDestinationAddressInverseFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableEvent (XMC_ETH_MAC_t *const eth_mac, uint32_t event)
 
void XMC_ETH_MAC_DisableFrameBurst (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableFrameFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableJumboFrame (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableLoopback (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableMulticastHashFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisablePowerDownMode (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisablePowerManagmentEvent (XMC_ETH_MAC_t *const eth_mac, uint32_t event)
 
void XMC_ETH_MAC_DisablePromiscuousMode (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisablePTPAlarm (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableReceptionBroadcastFrames (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableReceptionMulticastFrames (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableRx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableRxOwn (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableRxWatchdog (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableSourceAddressFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableSourceAddressInverseFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableTx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableTxJabber (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_DisableUnicastHashFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_Enable (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableDestinationAddressInverseFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableEvent (XMC_ETH_MAC_t *const eth_mac, uint32_t event)
 
void XMC_ETH_MAC_EnableFrameBurst (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableFrameFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableHashPerfectFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableJumboFrame (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableLoopback (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableMulticastHashFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnablePerfectFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnablePowerDownMode (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnablePowerManagmentEvent (XMC_ETH_MAC_t *const eth_mac, uint32_t event)
 
void XMC_ETH_MAC_EnablePromiscuousMode (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnablePTPAlarm (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableReceptionBroadcastFrames (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableReceptionMulticastFrames (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableRx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableRxOwn (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableRxWatchdog (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableSourceAddressFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableSourceAddressInverseFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableTx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableTxJabber (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_EnableUnicastHashFilter (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_FlushRx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_FlushTx (XMC_ETH_MAC_t *const eth_mac)
 
uint64_t XMC_ETH_MAC_GetAddress (XMC_ETH_MAC_t *const eth_mac)
 
uint32_t XMC_ETH_MAC_GetEventStatus (const XMC_ETH_MAC_t *const eth_mac)
 
uint32_t XMC_ETH_MAC_GetPTPStatus (const XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_GetPTPTime (XMC_ETH_MAC_t *const eth_mac, XMC_ETH_MAC_TIME_t *const time)
 
uint8_t * XMC_ETH_MAC_GetRxBuffer (XMC_ETH_MAC_t *const eth_mac)
 
uint32_t XMC_ETH_MAC_GetRxFrameSize (XMC_ETH_MAC_t *const eth_mac)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_GetRxTimeStamp (XMC_ETH_MAC_t *const eth_mac, XMC_ETH_MAC_TIME_t *const time)
 
uint8_t * XMC_ETH_MAC_GetTxBuffer (XMC_ETH_MAC_t *const eth_mac)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_GetTxTimeStamp (XMC_ETH_MAC_t *const eth_mac, XMC_ETH_MAC_TIME_t *const time)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_Init (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_InitPTP (XMC_ETH_MAC_t *const eth_mac, uint32_t config)
 
void XMC_ETH_MAC_InitPTPEx (XMC_ETH_MAC_t *const eth_mac, uint32_t config, XMC_ETH_MAC_TIME_t *const time)
 
void XMC_ETH_MAC_InitRxDescriptors (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_InitTxDescriptors (XMC_ETH_MAC_t *const eth_mac)
 
bool XMC_ETH_MAC_IsEnabled (const XMC_ETH_MAC_t *const eth_mac)
 
bool XMC_ETH_MAC_IsMagicPacketReceived (XMC_ETH_MAC_t *const eth_mac)
 
bool XMC_ETH_MAC_IsRxDescriptorOwnedByDma (XMC_ETH_MAC_t *const eth_mac)
 
bool XMC_ETH_MAC_IsTxDescriptorOwnedByDma (XMC_ETH_MAC_t *const eth_mac)
 
bool XMC_ETH_MAC_IsWakeupFrameReceived (XMC_ETH_MAC_t *const eth_mac)
 
uint32_t XMC_ETH_MAC_ReadFrame (XMC_ETH_MAC_t *const eth_mac, uint8_t *const frame, uint32_t len)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_ReadPhy (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, uint8_t reg_addr, uint16_t *data)
 
void XMC_ETH_MAC_Reset (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_ResumeRx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_ResumeTx (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_ReturnRxDescriptor (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_ReturnTxDescriptor (XMC_ETH_MAC_t *const eth_mac)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_SendFrame (XMC_ETH_MAC_t *const eth_mac, const uint8_t *frame, uint32_t len, uint32_t flags)
 
void XMC_ETH_MAC_SetAddress (XMC_ETH_MAC_t *const eth_mac, uint64_t addr)
 
void XMC_ETH_MAC_SetAddressHashFilter (XMC_ETH_MAC_t *const eth_mac, const uint64_t hash)
 
void XMC_ETH_MAC_SetAddressPerfectFilter (XMC_ETH_MAC_t *const eth_mac, uint8_t index, const uint64_t addr, uint32_t flags)
 
void XMC_ETH_MAC_SetLink (XMC_ETH_MAC_t *const eth_mac, XMC_ETH_LINK_SPEED_t speed, XMC_ETH_LINK_DUPLEX_t duplex)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_SetManagmentClockDivider (XMC_ETH_MAC_t *const eth_mac)
 
void XMC_ETH_MAC_SetPortControl (XMC_ETH_MAC_t *const eth_mac, const XMC_ETH_MAC_PORT_CTRL_t port_ctrl)
 
void XMC_ETH_MAC_SetPTPAlarm (XMC_ETH_MAC_t *const eth_mac, const XMC_ETH_MAC_TIME_t *const time)
 
void XMC_ETH_MAC_SetPTPTime (XMC_ETH_MAC_t *const eth_mac, XMC_ETH_MAC_TIME_t *const time)
 
void XMC_ETH_MAC_SetTxBufferSize (XMC_ETH_MAC_t *const eth_mac, uint32_t size)
 
void XMC_ETH_MAC_SetVLANTag (XMC_ETH_MAC_t *const eth_mac, uint16_t tag)
 
void XMC_ETH_MAC_SetWakeUpFrameFilter (XMC_ETH_MAC_t *const eth_mac, const uint32_t(*const filter)[(8U)])
 
void XMC_ETH_MAC_UpdateAddend (XMC_ETH_MAC_t *const eth_mac, uint32_t addend)
 
void XMC_ETH_MAC_UpdatePTPTime (XMC_ETH_MAC_t *const eth_mac, const XMC_ETH_MAC_TIME_t *const time)
 
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_WritePhy (XMC_ETH_MAC_t *const eth_mac, uint8_t phy_addr, uint8_t reg_addr, uint16_t data)
 

Detailed Description

The Ethernet MAC (ETH) is a major communication peripheral that supports 10/100 MBit/s data transfer rates in compliance with the IEEE 802.3-2002 standard. The ETH may be used to implement internet connected applications using IPv4 and IPv6. The ETH also includes support for IEEE1588 time synchronisation to allow implementation of Real Time Ethernet protocols.

The XMC_ETH_MAC low level driver provides functions to configure and initialize the ETH_MAC hardware peripheral.

Macro Definition Documentation

#define ETH_MAC_DMA_RDES0_AFM   (0x40000000U)

Destination address filter fail

#define ETH_MAC_DMA_RDES0_CE   (0x00000002U)

CRC error

#define ETH_MAC_DMA_RDES0_DBE   (0x00000004U)

Dribble bit error

#define ETH_MAC_DMA_RDES0_DE   (0x00004000U)

Descriptor error

#define ETH_MAC_DMA_RDES0_ES   (0x00008000U)

Error summary

#define ETH_MAC_DMA_RDES0_ESA   (0x00000001U)

Extended Status/Rx MAC address

#define ETH_MAC_DMA_RDES0_FL   (0x3FFF0000U)

Frame length mask

#define ETH_MAC_DMA_RDES0_FS   (0x00000200U)

First descriptor

#define ETH_MAC_DMA_RDES0_FT   (0x00000020U)

Frame type

#define ETH_MAC_DMA_RDES0_LC   (0x00000040U)

Late collision

#define ETH_MAC_DMA_RDES0_LE   (0x00001000U)

Length error

#define ETH_MAC_DMA_RDES0_LS   (0x00000100U)

Last descriptor

#define ETH_MAC_DMA_RDES0_OE   (0x00000800U)

Overflow error

#define ETH_MAC_DMA_RDES0_OWN   (0x80000000U)

RDES0 Descriptor RX Packet StatusOwn bit 1=DMA, 0=CPU

#define ETH_MAC_DMA_RDES0_RE   (0x00000008U)

Receive error

#define ETH_MAC_DMA_RDES0_RWT   (0x00000010U)

Receive watchdog timeout

#define ETH_MAC_DMA_RDES0_SAF   (0x00002000U)

Source address filter fail

#define ETH_MAC_DMA_RDES0_TSA   (0x00000080U)

Timestamp available

#define ETH_MAC_DMA_RDES0_VLAN   (0x00000400U)

VLAN tag

#define ETH_MAC_DMA_TDES0_CC   (0x00000078U)

Collision count

#define ETH_MAC_DMA_TDES0_CIC   (0x00C00000U)

Checksum insertion control

#define ETH_MAC_DMA_TDES0_DB   (0x00000001U)

Deferred bit

#define ETH_MAC_DMA_TDES0_DC   (0x08000000U)

Disable CRC

#define ETH_MAC_DMA_TDES0_DP   (0x04000000U)

Disable pad

#define ETH_MAC_DMA_TDES0_EC   (0x00000100U)

Excessive collision

#define ETH_MAC_DMA_TDES0_ED   (0x00000004U)

Excessive deferral

#define ETH_MAC_DMA_TDES0_ES   (0x00008000U)

Error summary

#define ETH_MAC_DMA_TDES0_FF   (0x00002000U)

Frame flushed

#define ETH_MAC_DMA_TDES0_FS   (0x10000000U)

First segment

#define ETH_MAC_DMA_TDES0_IC   (0x40000000U)

Interrupt on competition

#define ETH_MAC_DMA_TDES0_IHE   (0x00010000U)

IP header error

#define ETH_MAC_DMA_TDES0_IPE   (0x00001000U)

IP payload error

#define ETH_MAC_DMA_TDES0_JT   (0x00004000U)

Jabber timeout

#define ETH_MAC_DMA_TDES0_LC   (0x00000200U)

Late collision

#define ETH_MAC_DMA_TDES0_LOC   (0x00000800U)

Loss of carrier

#define ETH_MAC_DMA_TDES0_LS   (0x20000000U)

Last segment

#define ETH_MAC_DMA_TDES0_NC   (0x00000400U)

No carrier

#define ETH_MAC_DMA_TDES0_OWN   (0x80000000U)

TDES0 Descriptor TX Packet Control/StatusOwn bit 1=DMA, 0=CPU

#define ETH_MAC_DMA_TDES0_TCH   (0x00100000U)

Second address chained

#define ETH_MAC_DMA_TDES0_TER   (0x00200000U)

Transmit end of ring

#define ETH_MAC_DMA_TDES0_TTSE   (0x02000000U)

Transmit time stamp enable

#define ETH_MAC_DMA_TDES0_TTSS   (0x00020000U)

Transmit time stamp status

#define ETH_MAC_DMA_TDES0_UF   (0x00000002U)

Underflow error

#define ETH_MAC_DMA_TDES0_VF   (0x00000080U)

VLAN frame

#define XMC_ETH_MAC_BUF_SIZE   (1524)

ETH MAC buffer size

#define XMC_ETH_MAC_PHY_MAX_RETRIES   (0xffffUL)

Maximum retries

#define XMC_ETH_WAKEUP_REGISTER_LENGTH   (8U)

Remote wakeup frame reg length

Enumeration Type Documentation

ETH duplex settings (full/half?)

Enumerator
XMC_ETH_LINK_DUPLEX_HALF 

Half duplex

XMC_ETH_LINK_DUPLEX_FULL 

Full duplex

Link interface

Enumerator
XMC_ETH_LINK_INTERFACE_MII 

Link interface: Media independent interface

XMC_ETH_LINK_INTERFACE_RMII 

Link interface: Reduced media independent interface

ETH link speed

Enumerator
XMC_ETH_LINK_SPEED_10M 

Link speed: 10M

XMC_ETH_LINK_SPEED_100M 

Link speed: 100M

ETH link status

Enumerator
XMC_ETH_LINK_STATUS_DOWN 

Link status down

XMC_ETH_LINK_STATUS_UP 

Link status up

MAC address filter

Enumerator
XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE0 

Address filter mask: byte 0

XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE1 

Address filter mask: byte 1

XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE2 

Address filter mask: byte 2

XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE3 

Address filter mask: byte 3

XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE4 

Address filter mask: byte 4

XMC_ETH_MAC_ADDR_FILTER_MASK_BYTE5 

Address filter mask: byte 5

XMC_ETH_MAC_ADDR_FILTER_SA 

Address filter SA

ETH MAC event

Enumerator
XMC_ETH_MAC_EVENT_PMT 

Power management event

XMC_ETH_MAC_EVENT_TIMESTAMP 

Time stamp event

XMC_ETH_MAC_EVENT_EARLY_RECEIVE 

Early receive

XMC_ETH_MAC_EVENT_BUS_ERROR 

Bus error

XMC_ETH_MAC_EVENT_EARLY_TRANSMIT 

Early transmit

XMC_ETH_MAC_EVENT_RECEIVE_WATCHDOG_TIMEOUT 

Receive watchdog time-out

XMC_ETH_MAC_EVENT_RECEIVE_PROCESS_STOPPED 

Receive process stopped

XMC_ETH_MAC_EVENT_RECEIVE_BUFFER_UNAVAILABLE 

Receive buffer unavailable

XMC_ETH_MAC_EVENT_RECEIVE 

Receive event

XMC_ETH_MAC_EVENT_TRANSMIT_UNDERFLOW 

Transmit underflow

XMC_ETH_MAC_EVENT_RECEIVE_OVERFLOW 

Receive overflow

XMC_ETH_MAC_EVENT_TRANSMIT_JABBER_TIMEOUT 

Transmit jabber time-out

XMC_ETH_MAC_EVENT_TRANSMIT_BUFFER_UNAVAILABLE 

Transmit buffer unavailable

XMC_ETH_MAC_EVENT_TRANSMIT_PROCESS_STOPPED 

Transmit process stopped

XMC_ETH_MAC_EVENT_TRANSMIT 

Transmit event

Power management events that triggers a PMT interrupt

Enumerator
XMC_ETH_MAC_PMT_EVENT_ON_WAKEUP_FRAME 

Wakeup frame

XMC_ETH_MAC_PMT_EVENT_ON_MAGIC_PACKET 

Magic packet

XMC_ETH_MAC_PMT_EVENT_ON_UNICAST_FRAME_FILTER 

Unicast frame filter

Ethernet MAC status return values

Enumerator
XMC_ETH_MAC_STATUS_OK 

Driver accepted application request

XMC_ETH_MAC_STATUS_BUSY 

Driver is busy and cannot handle request

XMC_ETH_MAC_STATUS_ERROR 

Driver could not fulfil application request

ETH MAC time-stamp configuration enable

Enumerator
XMC_ETH_MAC_TIMESTAMP_CONFIG_FINE_UPDATE 

Fine update

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_TS_INTERRUPT 

Timestamp Interrupt Trigger Enable

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_ALL_FRAMES 

Enable all frames

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_PTPV2 

PTPV2

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_PTP_OVER_ETHERNET 

PTP over ETH

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_PTP_OVER_IPV6 

PTP over IPV6

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_PTP_OVER_IPV4 

PTP over IPV4

XMC_ETH_MAC_TIMESTAMP_CONFIG_ENABLE_MAC_ADDRESS_FILTER 

MAC address filter

ETH MAC time-stamp status

Enumerator
XMC_ETH_MAC_TIMESTAMP_STATUS_SECONDS_OVERFLOW 

Indicates that the seconds value of the timestamp has overflowed beyond 0xFFFFFFFF

XMC_ETH_MAC_TIMESTAMP_STATUS_TARGET_TIME_REACHED 

Indicates that the value of system time is greater or equal to the value specified in the Target_Time_ Seconds Register and Target Time Nanoseconds Register

XMC_ETH_MAC_TIMESTAMP_STATUS_TARGET_TIMER_ERROR 

Set when the target time, being programmed in Target Time Registers, is already elapsed

Transmission frame

Enumerator
XMC_ETH_MAC_TX_FRAME_FRAGMENT 

Indicate frame fragment

XMC_ETH_MAC_TX_FRAME_EVENT 

Generate event when frame is transmitted

XMC_ETH_MAC_TX_FRAME_TIMESTAMP 

Capture frame time stamp

Function Documentation

void XMC_ETH_MAC_AdjustPTPClock ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  correction 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
correctionCorrection factor
Returns
None
Description:
Adjust PTP clock
The function can be used to adjust the PTP clock (time synchronization). Please see the function implementation for more information.
void XMC_ETH_MAC_ClearEventStatus ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  event 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
eventThe status of which event (or a combination of logically OR'd events) needs to be cleared
Returns
None
Description:
Clear event status
The function clears the status of an event passed as a parameter to the function.
void XMC_ETH_MAC_Disable ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable the Ethernet MAC peripheral
The function asserts the peripheral reset.
void XMC_ETH_MAC_DisableDestinationAddressInverseFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable destination address inverse filtering
The function sets the DAIF bitfield of the MAC_FRAME_FILTER register. It can be used to perform normal filtering of frames.
void XMC_ETH_MAC_DisableEvent ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  event 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
eventWhich event (or a combination of logically OR'd events) needs to be disabled?
Returns
None
Description:
Disable an ETH MAC event(s)
The function can be used to disable ETH MAC event(s).
void XMC_ETH_MAC_DisableFrameBurst ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Frame burst disable
The function can be used to disable frame bursting.
void XMC_ETH_MAC_DisableFrameFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable frame filter
The function sets the RA bitfield of the MAC_FRAME_FILTER register. This ensures that the receiver module passes all received frames, irrespective of whether they pass the address filter or not.
void XMC_ETH_MAC_DisableJumboFrame ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Jumbo frame disable
The function can be used to disable jumbo frames.
void XMC_ETH_MAC_DisableLoopback ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable loopback mode
The function can be used to disable the loopback mode.
void XMC_ETH_MAC_DisableMulticastHashFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable multicast hash filter
The function disables multicast hash filtering. The MAC performs a perfect destination address filtering for multicast frames post invocation.
void XMC_ETH_MAC_DisablePowerDownMode ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable power down mode
The function disables the power down mode of the ETH MAC.
void XMC_ETH_MAC_DisablePowerManagmentEvent ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  event 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
eventA valid ETH PMT event (XMC_ETH_MAC_PMT_EVENT_t) or a valid combination of logically OR'd events
Returns
None
Description:
Disable power management event(s)
The function disables the event(s) that trigger(s) a PMT interrupt.
void XMC_ETH_MAC_DisablePromiscuousMode ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable promiscuous mode
The function disables the promiscuous mode.
void XMC_ETH_MAC_DisablePTPAlarm ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disables timestamp interrupt
The timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register (Alarm). After the generation of the Timestamp Trigger Interrupt, the interrupt is disabled.
void XMC_ETH_MAC_DisableReceptionBroadcastFrames ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable reception of broadcast frames
The function sets the DBF bitfield of the MAC_FRAME_FILTER register. When set, the AFM module filters all incoming broadcast frames. In addition, it overrides all other filter settings.
void XMC_ETH_MAC_DisableReceptionMulticastFrames ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable reception of multicast frames
The function disables the reception of multicast frames. When invoked, the AFM module passes all received broadcast frames.
void XMC_ETH_MAC_DisableRx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
ETH MAC Disable RX
The function disables the receive process.
void XMC_ETH_MAC_DisableRxOwn ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable receive own
On invocation of the function, the MAC disables the reception of frames in the half-duplex mode.
void XMC_ETH_MAC_DisableRxWatchdog ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable RX watchdog
The function disables the RX watchdog by disabling the timer on the RX.
void XMC_ETH_MAC_DisableSourceAddressFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable source address filter
The function resets the SAF bitfield of the MAC_FRAME_FILTER register. Verbatim from the reference manual - "When invoked, the MAC forwards the received frame to the application and updates the SA Match bit of the RxStatus depending on the SA address comparison".
void XMC_ETH_MAC_DisableSourceAddressInverseFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable source address inverse filtering
The function resets the SAIF bitfield of the MAC_FRAME_FILTER register. Verbatim from the reference manual - "When invoked, frames whose SA does not match the SA registers are marked as failing the SA Address filter".
void XMC_ETH_MAC_DisableTx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
ETH MAC Disable TX
The function disables the transmit process.
void XMC_ETH_MAC_DisableTxJabber ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable TX jabber
When the function is invoked, the MAC disables the jabber timer on TX.
void XMC_ETH_MAC_DisableUnicastHashFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Disable unicast hash filter
The function disables unicast hash filtering. When invoked, the MAC performs a perfect destination address filtering for unicast frames.
void XMC_ETH_MAC_Enable ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable the Ethernet MAC peripheral
The function de-asserts the peripheral reset.
void XMC_ETH_MAC_EnableDestinationAddressInverseFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable destination address inverse filtering
The function sets the DAIF bitfield of the MAC_FRAME_FILTER register. Verbatim from the reference manual - "When invoked, the address check block operates in inverse filtering mode for the DA address comparison for both unicast and multicast frames".
void XMC_ETH_MAC_EnableEvent ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  event 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
eventWhich event (or a combination of logically OR'd events) needs to be enabled?
Returns
None
Description:
Enable ETH MAC event(s)
The function can be used to enable ETH MAC event(s).
void XMC_ETH_MAC_EnableFrameBurst ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Frame burst enable
The function can be used to enable frame bursting during transmission in the MII half-duplex mode.
void XMC_ETH_MAC_EnableFrameFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable frame filter
The function resets the RA bitfield of the MAC_FRAME_FILTER register. This ensures that the receiver module passes only those frames (to the application) that pass the SA or DA address filter.
void XMC_ETH_MAC_EnableHashPerfectFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable hash perfect filter
The function sets the HPF bitfield of the MAC_FRAME_FILTER register. The function configures the address filter to pass a frame if it matches either the perfect filtering or the hash filtering.
void XMC_ETH_MAC_EnableJumboFrame ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Jumbo frame enable
The function can be used to enable jumbo frames. When enabled, the MAC allows jumbo frames of 9,018 bytes without reporting a giant frame error in the receive frame status.
void XMC_ETH_MAC_EnableLoopback ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable loopback mode
The function enables the MAC to operate in the loopback mode using the MII.
void XMC_ETH_MAC_EnableMulticastHashFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable multicast hash filter
When invoked, the MAC performs destination address filtering of received multicast frames according to the hash table.
void XMC_ETH_MAC_EnablePerfectFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable perfect filter
The function clears the HPF bitfield of the MAC_FRAME_FILTER register. When the function is invoked, the frame is passed only if it matches the hash filter.
void XMC_ETH_MAC_EnablePowerDownMode ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable power down mode
The function enables the power down mode of the ETH MAC.
void XMC_ETH_MAC_EnablePowerManagmentEvent ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  event 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
eventA valid ETH PMT event (XMC_ETH_MAC_PMT_EVENT_t) or a valid combination of logically OR'd events
Returns
None
Description:
Enable power management event(s)
The function enables the event(s) that trigger(s) a PMT interrupt.
void XMC_ETH_MAC_EnablePromiscuousMode ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable promiscuous mode
The function enables the promiscuous mode. In this mode, the address filter module passes all incoming frames regardless of its destination or source address.
void XMC_ETH_MAC_EnablePTPAlarm ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enables timestamp interrupt
The timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register (Alarm). After the generation of the Timestamp Trigger Interrupt, the interrupt is disabled.
void XMC_ETH_MAC_EnableReceptionBroadcastFrames ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable reception of broadcast frames
This function enables the AFM module to pass all received broadcast frames.
void XMC_ETH_MAC_EnableReceptionMulticastFrames ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable reception of multicast frames
The function sets the DBF bitfield of the MAC_FRAME_FILTER register. When set, the AFM module filters all incoming broadcast frames. In addition, it overrides all other filter settings.
void XMC_ETH_MAC_EnableRx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
ETH MAC Enable RX
The function enables the receiver state machine of the MAC and puts the receive process in running state. The DMA then acquires the descriptor from the receive list and processes the received frames.
void XMC_ETH_MAC_EnableRxOwn ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable receive own
The function enables the MAC to receive all packets that are given by the PHY while transmitting.
void XMC_ETH_MAC_EnableRxWatchdog ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable RX watchdog
The function enables the RX watchdog by clearing the WD bitfield of the MAC_CONFIGURATION register. When invoked, the MAC does not allow more than 2048 bytes of the frame being received.
void XMC_ETH_MAC_EnableSourceAddressFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable source address filter
The function sets the SAF bitfield of the MAC_FRAME_FILTER register. Verbatim from the reference manual - "When invoked, the MAC compares the SA field of the received frames with the values programmed in the enabled SA registers. If the comparison matches, then the SA Match bit of RxStatus Word is set high. When this bit is set high and the SA filter fails, the MAC drops the frame.
void XMC_ETH_MAC_EnableSourceAddressInverseFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable source address inverse filtering
The function resets the SAIF bitfield of the MAC_FRAME_FILTER register. Verbatim from the reference manual - "When invoked, the address check block operates in inverse filtering mode for the SA address comparison. The frames whose SA matches the SA registers are marked as failing the SA Address filter".
void XMC_ETH_MAC_EnableTx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
ETH MAC Enable TX
The function enables the transmit state machine of the MAC and puts the transmit process in running state. The DMA then checks the TX list at the current position for transmitting a frame.
void XMC_ETH_MAC_EnableTxJabber ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable TX jabber
When the function is invoked, the MAC cuts off the transmitter if the application sends out more than 2,048 bytes of data during transmission (10,240 bytes if jumbo frames are enabled)
void XMC_ETH_MAC_EnableUnicastHashFilter ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Enable unicast hash filter
The function enables the MAC to perform destination address filtering of unicast frames according to the hash table.
void XMC_ETH_MAC_FlushRx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Flush RX
The function initializes the RX DMA descriptors and enables the DMA transmission.
void XMC_ETH_MAC_FlushTx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Flush TX
The function initializes the TX DMA descriptors and enables the DMA transmission.
uint64_t XMC_ETH_MAC_GetAddress ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
uint64_t The MAC address which has been set
Description:
Get MAC address
The function returns the current ETH MAC address.
uint32_t XMC_ETH_MAC_GetEventStatus ( const XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
uint32_t Event status
Description:
Get event status
The function returns the ETH status and interrupt status as a single word. The user can then check the status of the events by using an appropriate mask.
uint32_t XMC_ETH_MAC_GetPTPStatus ( const XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
uint32_t Timestamp status
Description:
Get PTP status
The function returns the timestamp status by reading the TIMESTAMP_STATUS register. As indicated in the reference manual, all bits of the TIMESTAMP_STATUS register (except bits [27:25]) are cleared after the invocation of this function.
void XMC_ETH_MAC_GetPTPTime ( XMC_ETH_MAC_t *const  eth_mac,
XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the PTP time
Returns
None
Description:
Get PTP time
The function obtains the PTP time and writes the nanoseconds and seconds info to the 'time' argument.
uint8_t* XMC_ETH_MAC_GetRxBuffer ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
Pointer to current RX buffer
Description:
Returns the current RX buffer.
uint32_t XMC_ETH_MAC_GetRxFrameSize ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
uint32_t RX frame size
Description:
Get RX frame size
The function is used to get the effective length of the RX frame size.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_GetRxTimeStamp ( XMC_ETH_MAC_t *const  eth_mac,
XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the RX timestamp
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status
Description:
Get RX timestamp
The function can be used to get the RX timestamp.
uint8_t* XMC_ETH_MAC_GetTxBuffer ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
Pointer to current TX buffer
Description:
Returns the current TX buffer.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_GetTxTimeStamp ( XMC_ETH_MAC_t *const  eth_mac,
XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the TX timestamp
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status
Description:
Get TX timestamp
The function can be used to get the TX timestamp.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_Init ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
XMC_ETH_MAC_STATUS_t Initialization status
Description:
Initialize the Ethernet MAC peripheral
The function sets the link speed, applies the duplex mode, sets auto-negotiation and loop-back settings.
void XMC_ETH_MAC_InitPTP ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  config 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
configThe configuration the PTP should be configured with
Returns
None
Description:
Initialize PTP
The function can be used to initialize PTP.
void XMC_ETH_MAC_InitPTPEx ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  config,
XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
configConfiguration of PTP module. See XMC_ETH_MAC_TIMESTAMP_CONFIG_t
timeInitialization time
Returns
None
Description:
Initialize PTP
The function can be used to initialize PTP given a time parameter in addition
void XMC_ETH_MAC_InitRxDescriptors ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Initialize the RX DMA descriptors
The function initializes the RX descriptors in a chained configuration. It sets up the status bit, control bit, buffer length and the buffer pointer.
void XMC_ETH_MAC_InitTxDescriptors ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Initialize the TX DMA descriptors
The function initializes the TX descriptors in a chained configuration. It sets up the status bit, control bit, buffer length and the buffer pointer.
bool XMC_ETH_MAC_IsEnabled ( const XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
bool
Description:
Check if the ETH MAC is enabled
The function checks if the ETH MAC is enabled or not. It returns "true" if the peripheral is enabled, "false" otherwise.
bool XMC_ETH_MAC_IsMagicPacketReceived ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
bool true if the received packet is a magic packet, false otherwise
Description:
Is magic packet received?
The function checks if the packet received is a magic packet.
bool XMC_ETH_MAC_IsRxDescriptorOwnedByDma ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
bool true if RX descriptor is owned by DMA, false otherwise
Description:
Is RX descriptor owned by DMA?
The function checks if the RX descriptor is owned by the DMA.

< Own bit 1=DMA, 0=CPU

bool XMC_ETH_MAC_IsTxDescriptorOwnedByDma ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
bool true if TX descriptor is owned by DMA, false otherwise
Description:
Is TX descriptor owned by DMA?
The function checks if the TX descriptor is owned by the DMA.

< Own bit 1=DMA, 0=CPU

bool XMC_ETH_MAC_IsWakeupFrameReceived ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
bool true if the received packet is a wakeup frame, false otherwise
Description:
Is wakeup frame received?
The function checks if the packet received is a wakeup frame.
uint32_t XMC_ETH_MAC_ReadFrame ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t *const  frame,
uint32_t  len 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
frameA constant pointer to a uint8_t constant, holding the received frame
lenFrame length?
Returns
uint32_t Length of the frame
Description:
Read a frame
The function is used to read a frame. The function returns 'len', the length as specified as the actual parameter in the function call.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_ReadPhy ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr,
uint8_t  reg_addr,
uint16_t *  data 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPHY address
reg_addrRegister address
dataThe destination to which the read data needs to be copied to
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status
Description:
Read a PHY register
The function reads a PHY register. It essentially polls busy bit during max PHY_TIMEOUT time and reads the information into 'data' when not busy.
void XMC_ETH_MAC_Reset ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Reset the ETH MAC peripheral
The function resets the ETH MAC peripheral. It blocks until reset.
void XMC_ETH_MAC_ResumeRx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Resume RX
Verbatim from the reference manual the function enables the DMA to read the current descriptor pointed to by the "current host transmit descriptor" reg. If that descriptor is not available (owned by the CPU), the transmission returns to the suspend state else the transmission resumes.
void XMC_ETH_MAC_ResumeTx ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Resume TX
Verbatim from the reference manual, the function enables the DMA to read the current descriptor pointed to by the "current host transmit descriptor" reg. If that descriptor is not available (owned by the CPU), the transmission returns to the suspend state else the transmission resumes.
void XMC_ETH_MAC_ReturnRxDescriptor ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Return RX descriptor
The function sets the specified DMA RX descriptor own bit.
void XMC_ETH_MAC_ReturnTxDescriptor ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
None
Description:
Return TX descriptor
The function sets the specified DMA TX descriptor own bit.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_SendFrame ( XMC_ETH_MAC_t *const  eth_mac,
const uint8_t *  frame,
uint32_t  len,
uint32_t  flags 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
frameA pointer to a uint8_t constant, holding the frame to be transmitted
lenLength of the frame to transmit
flagsAdditional flags: ored combination of XMC_ETH_MAC_TX_FRAME_t or zero.
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status (XMC_ETH_MAC_STATUS_BUSY if busy, XMC_ETH_MAC_STATUS_OK otherwise).
Description:
Send a frame
The function is used to send a frame. The transmission is done using the ETH MAC's dedicated DMA unit.
void XMC_ETH_MAC_SetAddress ( XMC_ETH_MAC_t *const  eth_mac,
uint64_t  addr 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
addrThe MAC address to set
Returns
None
Description:
Set MAC address
The function sets the MAC address by writing to the MAC_ADDRESS0_HIGH and MAC_ADDRESS0_LOW registers.
void XMC_ETH_MAC_SetAddressHashFilter ( XMC_ETH_MAC_t *const  eth_mac,
const uint64_t  hash 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
hashThe hash to be used for filtering
Returns
None
Description:
Set hash filter for group address filtering
The function sets up a hash filter for group address filtering. It writes the given hash value into the HASH_TABLE_LOW and HASH_TABLE_HIGH registers.
void XMC_ETH_MAC_SetAddressPerfectFilter ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  index,
const uint64_t  addr,
uint32_t  flags 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
indexTable entry index
addrAddress value
flagsCompare control. OR'ed combination of XMC_ETH_MAC_ADDR_FILTER_t or zero.
Returns
None
Description:
Set perfect filter for address filtering
The function can be used to set perfect filter for address filtering.
void XMC_ETH_MAC_SetLink ( XMC_ETH_MAC_t *const  eth_mac,
XMC_ETH_LINK_SPEED_t  speed,
XMC_ETH_LINK_DUPLEX_t  duplex 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
speedThe speed at which the link is set (10M or 100M?)
duplexDuplex settings (half or full duplex?)
Returns
None
Description:
Set link
The function sets the link speed and duplex settings.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_SetManagmentClockDivider ( XMC_ETH_MAC_t *const  eth_mac)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status
Description:
Set management clock divider
The function sets the management clock divider by writing to the GMII_ADDRESS register.
void XMC_ETH_MAC_SetPortControl ( XMC_ETH_MAC_t *const  eth_mac,
const XMC_ETH_MAC_PORT_CTRL_t  port_ctrl 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
port_ctrlPort control configuration
Returns
None
Description:
Set port control configuration
The function sets the port control by writing the configuration into the CON register.
Note
MII Mode is only available in:
  • XMC4500 LQFP144 and BGA144 packages
  • XMC4700 LQFP144 and BGA196 packages
  • XMC4800 LQFP144 and BGA196 packages
void XMC_ETH_MAC_SetPTPAlarm ( XMC_ETH_MAC_t *const  eth_mac,
const XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the PTP time
Returns
None
Description:
Set PTP alarm
The function programs the TARGET_TIME_NANOSECONDS and TARGET_TIME_SECONDS registers. It can be used to schedule an interrupt event triggered when the set alarm time limit is reached.
void XMC_ETH_MAC_SetPTPTime ( XMC_ETH_MAC_t *const  eth_mac,
XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the PTP time
Returns
None
Description:
Get PTP time
The function sets the PTP time give by the time parameter
void XMC_ETH_MAC_SetTxBufferSize ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  size 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
sizeSize of buffer
Returns
None
Description:
Sets the current TX buffer size.
void XMC_ETH_MAC_SetVLANTag ( XMC_ETH_MAC_t *const  eth_mac,
uint16_t  tag 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
tagThe (16 bit) VLAN tag to set
Returns
None
Description:
Set VLAN tag
The function sets the VLAN tag to identify the VLAN frames.
void XMC_ETH_MAC_SetWakeUpFrameFilter ( XMC_ETH_MAC_t *const  eth_mac,
const uint32_t(*)  filter[(8U)] 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
filterwake-up filter registers
Returns
None
Description:
Set wakeup frame filter
The function populates the remote wakeup frame registers.
void XMC_ETH_MAC_UpdateAddend ( XMC_ETH_MAC_t *const  eth_mac,
uint32_t  addend 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
addendAddend value
Returns
None
Description:
Adjust PTP clock
The function is used to adjust the PTP clock (time synchronization) to compensate a reference clock drift.
void XMC_ETH_MAC_UpdatePTPTime ( XMC_ETH_MAC_t *const  eth_mac,
const XMC_ETH_MAC_TIME_t *const  time 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
timeA constant pointer to XMC_ETH_MAC_TIME_t, pointing to the PTP time
Returns
None
Description:
Update PTP time
The function updates the PTP time with the nanoseconds and seconds info contained in the 'time' argument.
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_WritePhy ( XMC_ETH_MAC_t *const  eth_mac,
uint8_t  phy_addr,
uint8_t  reg_addr,
uint16_t  data 
)
Parameters
eth_macA constant pointer to XMC_ETH_MAC_t, pointing to the ETH MAC base address
phy_addrPHY address
reg_addrRegister address
dataThe data to write
Returns
XMC_ETH_MAC_STATUS_t ETH MAC status
Description:
Write a PHY register
The function reads a PHY register. It essentially writes the data and polls the busy bit until it is no longer busy.
Generated on Mon Aug 7 2017 11:33:57 for XMC Peripheral Library for XMC4000 Family by   doxygen 1.8.11