HAL ETH constants ¶
ETH peripheral global parameters ¶
Note
This section is not available for STM32C562xx.
- group ETH_Peripheral_Global_Params
Note
This section is not available for STM32C542xx.
ETH frame settings ¶
Note
This section is not available for STM32C562xx.
- group ETH_Frame_Settings
-
Defines
-
HAL_ETH_MAX_PACKET_SIZE_BYTE
(1528UL)
¶
-
Ethernet Maximum Packet Size in bytes unit (ETH_HEADER + 2*VLAN_TAG + MAX_ETH_PAYLOAD
ETH_CRC)
-
HAL_ETH_HEADER_SIZE_BYTE
(14UL)
¶
-
Ethernet Header Size in bytes unit (6 byte Dest addr, 6 byte Src addr, 2 byte length/type)
-
HAL_ETH_CRC_SIZE_BYTE
(4UL)
¶
-
Ethernet CRC Size in bytes unit
-
HAL_ETH_VLAN_TAG_SIZE_BYTE
(4UL)
¶
-
VLAN Tag Size in bytes unit (Optional 802.1q)
-
HAL_ETH_DOUBLE_VLAN_TAG_SIZE_BYTE
(8UL)
¶
-
Double VLAN Tag Size in bytes unit (Optional 802.1q)
-
HAL_ETH_MIN_PAYLOAD_SIZE_BYTE
(46UL)
¶
-
Minimum Ethernet Payload Size in bytes unit
-
HAL_ETH_MAX_PAYLOAD_SIZE_BYTE
(1500UL)
¶
-
Maximum Ethernet Payload Size in bytes unit
-
HAL_ETH_JUMBO_FRAME_PAYLOAD_SIZE_BYTE
(9000UL)
¶
-
Jumbo Frame Payload Size in bytes unit
-
HAL_ETH_MAX_PACKET_SIZE_BYTE
(1528UL)
¶
Note
This section is not available for STM32C542xx.
ETH Tx and Rx channel identifiers ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Identifiers
-
Defines
-
HAL_ETH_TX_CHANNEL_0
0x00000001UL
¶
-
ETH Tx Channel 0 id
-
HAL_ETH_TX_CHANNEL_ALL
0x00000001UL
¶
-
ETH All Tx Channels
-
HAL_ETH_RX_CHANNEL_0
0x00010000UL
¶
-
ETH Rx Channel 0 id
-
HAL_ETH_RX_CHANNEL_ALL
0x00010000UL
¶
-
ETH All Rx Channels
-
HAL_ETH_CHANNEL_ALL
(
HAL_ETH_TX_CHANNEL_ALL
|
\
HAL_ETH_RX_CHANNEL_ALL
)
¶
-
ETH All Tx and Rx Channels
-
HAL_ETH_TX_CHANNEL_0
0x00000001UL
¶
Note
This section is not available for STM32C542xx.
ETH Tx and Rx queue indexes ¶
ETH peripheral error codes ¶
Note
This section is not available for STM32C562xx.
- group ETH_Error_Code
-
Error codes for the Ethernet (ETH) peripheral.
These constants define the possible error codes returned by the Ethernet (ETH) peripheral HAL layer. They are typically used as bitmasks, allowing multiple errors conditions to be reported simultaneously.
Note
These error are synchronously reported through
p_error_cbCallback.Note
Use HAL_ETH_GetLastErrorCodes to retrieve the last error code.
Defines
-
HAL_ETH_ERROR_NONE
0x00000000UL
¶
-
No error
-
HAL_ETH_ERROR_FBE
ETH_DMACSR_FBE
¶
-
Fatal Bus Error
-
HAL_ETH_ERROR_CDE
ETH_DMACSR_CDE
¶
-
Context Descriptor Error
-
HAL_ETH_ERROR_FBE_DMA_RX_RD
(0x1UL
<<
ETH_DMACSR_REB_Pos)
¶
-
Bus Fault Error during read transfer by Rx DMA
-
HAL_ETH_ERROR_FBE_DMA_RX_AC
(0x2UL
<<
ETH_DMACSR_REB_Pos)
¶
-
Bus Fault Error during descriptor access by Rx DMA
-
HAL_ETH_ERROR_FBE_DMA_RX_WR
(0x4UL
<<
ETH_DMACSR_REB_Pos)
¶
-
Bus Fault Error during data transfer by Rx DMA
-
HAL_ETH_ERROR_FBE_DMA_TX_RD
(0x1UL
<<
ETH_DMACSR_TEB_Pos)
¶
-
Bus Fault Error during read transfer by TxDMA
-
HAL_ETH_ERROR_FBE_DMA_TX_AC
(0x2UL
<<
ETH_DMACSR_TEB_Pos)
¶
-
Bus Fault Error during descriptor access by Tx DMA
-
HAL_ETH_ERROR_FBE_DMA_TX_WR
(0x4UL
<<
ETH_DMACSR_TEB_Pos)
¶
-
Bus Fault Error during data transfer by Tx DMA
-
HAL_ETH_ERROR_UNDEFINED
0x80000000UL
¶
-
Undefined or unexpected error
-
HAL_ETH_ERROR_NONE
0x00000000UL
¶
Note
This section is not available for STM32C542xx.
ETH MAC peripheral status events ¶
Note
This section is not available for STM32C562xx.
- group ETH_MAC_Event_Codes
-
MAC Event codes for the Ethernet (ETH) peripheral.
These constants define the possible events codes returned by the Ethernet (ETH) peripheral HAL layer. They are typically used as bitmasks, allowing multiple events conditions to be reported simultaneously.
Note
These events are synchronously reported through
p_event_cbCallback.Defines
-
HAL_ETH_EVENT_MAC_RWT
ETH_MACRXTXSR_RWT
¶
-
Receive Watchdog Timeout Event
-
HAL_ETH_EVENT_MAC_EXCOL
ETH_MACRXTXSR_EXCOL
¶
-
Excessive Collisions Event
-
HAL_ETH_EVENT_MAC_LCOL
ETH_MACRXTXSR_LCOL
¶
-
Late Collision Event
-
HAL_ETH_EVENT_MAC_EXDEF
ETH_MACRXTXSR_EXDEF
¶
-
Excessive Deferral Event
-
HAL_ETH_EVENT_MAC_LCARR
ETH_MACRXTXSR_LCARR
¶
-
Loss of Carrier Event
-
HAL_ETH_EVENT_MAC_NCARR
ETH_MACRXTXSR_NCARR
¶
-
No Carrier Event
-
HAL_ETH_EVENT_MAC_TJT
ETH_MACRXTXSR_TJT
¶
-
Transmit Jabber Timeout Event
-
HAL_ETH_EVENT_MAC_RWT
ETH_MACRXTXSR_RWT
¶
Note
This section is not available for STM32C542xx.
ETH PMT peripheral status events ¶
Note
This section is not available for STM32C562xx.
- group ETH_PMT_Event_Codes
-
PMT Event codes for the Ethernet (ETH) peripheral.
These constants define the possible events codes returned by the Ethernet (ETH) peripheral HAL layer. They are typically used as bitmasks, allowing multiple events conditions to be reported simultaneously.
Note
These events are synchronously reported through
p_pmt_cbCallback.
Note
This section is not available for STM32C542xx.
ETH LPI peripheral status events ¶
Note
This section is not available for STM32C562xx.
- group ETH_LPI_Event_Codes
-
LPI Event codes for the Ethernet (ETH) peripheral.
These constants define the possible events codes returned by the Ethernet (ETH) peripheral HAL layer. They are typically used as bitmasks, allowing multiple events conditions to be reported simultaneously.
Note
These events are synchronously reported through
p_eee_cbCallback.Defines
-
HAL_ETH_EVENT_LPI_PLS_DOWN
0UL
¶
-
PHY Link Status is Down
-
HAL_ETH_EVENT_LPI_PLS_UP
ETH_MACLCSR_PLS
¶
-
PHY Link Status is Up
-
HAL_ETH_EVENT_LPI_TX_LPI_ST
ETH_MACLCSR_TLPIST
¶
-
Transmit LPI State Active
-
HAL_ETH_EVENT_LPI_RX_LPI_ST
ETH_MACLCSR_RLPIST
¶
-
Receive LPI State Active
-
HAL_ETH_EVENT_LPI_TX_LPI_EN
ETH_MACLCSR_TLPIEN
¶
-
Transmit LPI State Entry performed
-
HAL_ETH_EVENT_LPI_RX_LPI_EN
ETH_MACLCSR_RLPIEN
¶
-
Receive LPI State Entry performed
-
HAL_ETH_EVENT_LPI_TX_LPI_EX
ETH_MACLCSR_TLPIEX
¶
-
Transmit LPI State Exit performed
-
HAL_ETH_EVENT_LPI_RX_LPI_EX
ETH_MACLCSR_RLPIEX
¶
-
Receive LPI State Exit performed
-
HAL_ETH_EVENT_LPI_PLS_DOWN
0UL
¶
Note
This section is not available for STM32C542xx.
ETH channel event codes ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Event_Codes
-
Event codes for the Ethernet (ETH) channel.
These constants define the possible events codes returned by the Ethernet (ETH) channel HAL layer. They are typically used as bitmasks, allowing multiple events conditions to be reported simultaneously.
Note
These events are reported through registered
p_ch_event_cbto the user.Defines
-
HAL_ETH_CH_EVENT_DMA_RBU
ETH_DMACSR_RBU
¶
-
Receive Buffer Unavailable Event (bit[7]), This event indicates that there is no more available resources (memory) to perform the incoming packet reception. The Rx process is suspended. To resume processing Rx packets, the application must provide more memory to the driver to allow resuming Rx process of the next recognized incoming packet. This event is available ONLY for Receive Channels.
-
HAL_ETH_CH_EVENT_DMA_TBU
ETH_DMACSR_TBU
¶
-
Transmit Buffer Unavailable Event (bit[2]), This event indicates that the application owns the next descriptor in the Transmit list, and the DMA cannot acquire it. Transmission is suspended. This event is available ONLY for Transmit Channels.
-
HAL_ETH_CH_EVENT_DMA_RWT
ETH_DMACSR_RWT
¶
-
Receive Watchdog Timeout Event (bit[9]). This error is reported when a packet with length greater than 2,048 bytes (10,240 bytes when Jumbo Packet mode is enabled) is received. This error is reported ONLY for Receive Channels.
-
HAL_ETH_CH_EVENT_MTL_RX_OF
ETH_MTLQICSR_RXOVFIS
¶
-
MTL Receive Queue Overflow Interrupt Event (bit[16]). This event indicates that the Receive Queue had an overflow while receiving the packet. If a partial packet is transferred to the application, the overflow channel event HAL_ETH_RX_ERROR_OFL is reported.
-
HAL_ETH_CH_EVENT_MTL_TX_OF
ETH_MTLQICSR_TXUNFIS
¶
-
MTL Transmit Queue Underflow Interrupt Event (bit[0]). This event indicates that the Transmit Queue had an underflow while transmitting the packet. Transmission is suspended and an Underflow Error HAL_ETH_TX_ERROR_UF is reported to the application.
-
HAL_ETH_CH_EVENT_DMA_RBU
ETH_DMACSR_RBU
¶
Note
This section is not available for STM32C542xx.
ETH Rx channel errors ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Rx_Errors
-
Errors for the Ethernet (ETH) Rx channel.
These constants define the possible errors returned by the Ethernet (ETH) channel HAL layer. They are typically used as bitmasks, allowing multiple errors conditions to be reported simultaneously.
Note
These errors are reported through registered
p_rx_complete_cbto the user.Defines
-
HAL_ETH_RX_ERROR_IPH
(1UL
<<
3U)
¶
-
IP Header Error. When this error is reported, it indicates either of the following: The 16-bit IPv4 header checksum calculated by the MAC does not match the received checksum bytes. The IP datagram version is not consistent with the Ethernet Type value. Ethernet packet does not have the expected number of IP header bytes. This error is valid when IPv6 or IPv4 header is detected.
-
HAL_ETH_RX_ERROR_IPC
(1UL
<<
7U)
¶
-
IP Payload Error. When this error is reported, it indicates either of the following: The 16-bit IP payload checksum (that is, the TCP, UDP, or ICMP checksum) calculated by the MAC does not match the corresponding checksum field in the received segment. The TCP, UDP, or ICMP segment length does not match the payload length value in the IP Header field. The TCP, UDP, or ICMP segment length is less than minimum allowed segment length for TCP, UDP, or ICMP. This error is valid when IPv6 or IPv4 header is detected.
-
HAL_ETH_RX_ERROR_DB
(1UL
<<
19U)
¶
-
Dribble Bit Error. When this error is reported, it indicates that the received packet has a noninteger multiple of bytes (odd nibbles). This bit is valid only in the MII Mode.
-
HAL_ETH_RX_ERROR_REC
(1UL
<<
20U)
¶
-
Receive Error. When this error is reported, it indicates that the ETH_RX_ER signal is asserted while the ETH_RX_DV signal is asserted during packet reception. This error also includes carrier extension error in the GMII and Half-duplex mode. Error can be of less or no extension, or error (rxd!= 0f) during extension.
-
HAL_ETH_RX_ERROR_OFL
(1UL
<<
21U)
¶
-
Overflow Error. When this error is reported, it indicates that the received packet is damaged because of buffer overflow in Rx FIFO. This error is reported only when the DMA transfers a partial packet to the application.
-
HAL_ETH_RX_ERROR_RWT
(1UL
<<
22U)
¶
-
Receive Watchdog Timeout. When this error is reported, it indicates that the Receive Watchdog Timer has expired while receiving the current packet. The current packet is truncated after watchdog timeout.
-
HAL_ETH_RX_ERROR_GP
(1UL
<<
23U)
¶
-
Giant Packet. When this error is reported, it indicates that the packet length exceeds the specified maximum Ethernet size of 1518, 1522, or 2000 bytes (9018 or 9022 bytes if jumbo packet enable is set). Giant packet indicates only the packet length. It does not cause any packet truncation.
-
HAL_ETH_RX_ERROR_CRC
(1UL
<<
24U)
¶
-
CRC Error. When this error is reported, it indicates that a Cyclic Redundancy Check (CRC) error occurred on the received packet.
-
HAL_ETH_RX_ERROR_IPH
(1UL
<<
3U)
¶
Note
This section is not available for STM32C542xx.
ETH Tx channel errors ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Tx_Errors
-
Errors for the Ethernet (ETH) Tx channel.
These constants define the possible errors returned by the Ethernet (ETH) channel HAL layer. They are typically used as bitmasks, allowing multiple errors conditions to be reported simultaneously.
Note
These errors are reported through registered
p_tx_complete_cbto the user.Defines
-
HAL_ETH_TX_ERROR_IH
(1UL
<<
0U)
¶
-
IP Header Error. This error indicates that the Checksum Offload engine detected an IP header error. If COE detects an IP header error, it still inserts an IPv4 header checksum if the Ethernet Type field indicates an IPv4 payload. In Full-duplex mode, when EST/Qbv is enabled and this bit is set, it indicates the frame drop status due to Frame Size error or Schedule Error.
-
HAL_ETH_TX_ERROR_DB
(1UL
<<
1U)
¶
-
Deferred Bit. This error indicates that the MAC deferred before transmitting because of presence of carrier.
-
HAL_ETH_TX_ERROR_UF
(1UL
<<
2U)
¶
-
Underflow Error. This error indicates that the MAC aborted the packet because the data arrived late from the system memory.
-
HAL_ETH_TX_ERROR_ED
(1UL
<<
3U)
¶
-
Excessive Deferral. This error indicates that the transmission ended because of excessive deferral of over 24,288 bit times (155,680 bits times in 1000-Mbps mode or Jumbo Packet enabled mode).
-
HAL_ETH_TX_ERROR_EC
(1UL
<<
8U)
¶
-
Excessive Collision. This error indicates that the transmission was aborted after 16 successive collisions while attempting to transmit the current packet.
-
HAL_ETH_TX_ERROR_LC
(1UL
<<
9U)
¶
-
Late Collision. This error indicates that packet transmission was aborted because a collision occurred after the collision window (64 byte times including Preamble in MII mode and 512 byte times including Preamble and Carrier Extension in GMII mode).
-
HAL_ETH_TX_ERROR_NC
(1UL
<<
10U)
¶
-
No Carrier. This error indicates that the carrier sense signal form the PHY was not asserted during transmission.
-
HAL_ETH_TX_ERROR_LOC
(1UL
<<
11U)
¶
-
Loss of Carrier. This error indicates that Loss of Carrier occurred during packet transmission.
-
HAL_ETH_TX_ERROR_PC
(1UL
<<
12U)
¶
-
Payload Checksum Error. This error indicates that the Checksum Offload engine had a failure and did not insert any checksum into the encapsulated TCP, UDP, or ICMP payload.
-
HAL_ETH_TX_ERROR_JT
(1UL
<<
14U)
¶
-
Jabber Timeout. This error indicates that the MAC transmitter has experienced a jabber timeout.
-
HAL_ETH_TX_ERROR_DE
(1UL
<<
23U)
¶
-
Descriptor Error. This error indicates that the descriptor content is incorrect.
-
HAL_ETH_TX_ERROR_IH
(1UL
<<
0U)
¶
Note
This section is not available for STM32C542xx.
ETH Rx channel status ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Rx_Status
-
Status for the Ethernet (ETH) Rx channel.
These constants define the possible status returned by the Ethernet (ETH) channel HAL layer. They are typically used as bitmasks, allowing multiple status conditions to be reported simultaneously.
Note
These status are reported through registered
p_rx_complete_cbto the user.Defines
-
HAL_ETH_RX_STATUS_IPV4
(1UL
<<
4U)
¶
-
IPv4 header Present. This status indicates that an IPV4 header is detected.
-
HAL_ETH_RX_STATUS_IPV6
(1UL
<<
5U)
¶
-
IPv6 header Present. This status indicates that an IPV6 header is detected.
-
HAL_ETH_RX_STATUS_IPCB
(1UL
<<
6U)
¶
-
IP Checksum Bypassed. This status indicates that the checksum offload engine is bypassed.
-
HAL_ETH_RX_STATUS_ARPNR
(1UL
<<
10U)
¶
-
ARP Reply Not Generated. This status indicates that the MAC did not generate the ARP Reply for received ARP Request packet. This error is reported when the MAC is busy transmitting ARP reply to earlier ARP request (only one ARP request is processed at a time).
-
HAL_ETH_RX_STATUS_TSA
(1UL
<<
14U)
¶
-
Timestamp Available. This status indicates that the Timestamp value is available for the received packet. This is valid only when the last received frame of the packet is completed.
-
HAL_ETH_RX_STATUS_TD
(1UL
<<
15U)
¶
-
Timestamp Dropped. This status indicates that the timestamp was captured for this packet but got dropped in the MTL Rx FIFO because of overflow.
-
HAL_ETH_RX_STATUS_VLAN
(1UL
<<
25U)
¶
-
Outer (and Inner) VLAG Tag Present. This status indicates that an Outer VLAG tag is detected. If Double VLAN tag processing and VLAN tag stripping are enabled the Inner VLAN tag is detected too.
-
HAL_ETH_RX_STATUS_LD
(1UL
<<
28U)
¶
-
Last Descriptor. This status indicates indicates that the buffers to which this descriptor is pointing are the last segment of the packet.
-
HAL_ETH_RX_STATUS_FD
(1UL
<<
29U)
¶
-
First Descriptor. This status indicates that this descriptor contains the first segment of the packet.
-
HAL_ETH_RX_STATUS_INVALID
(1UL
<<
31U)
¶
-
Rx Buffer Status. This status status indicates that the buffer which this descriptor is pointing is dirty (no data were received).
-
HAL_ETH_RX_STATUS_IPV4
(1UL
<<
4U)
¶
Note
This section is not available for STM32C542xx.
ETH Tx channel status ¶
Note
This section is not available for STM32C562xx.
- group ETH_Channel_Tx_Status
-
Status for the Ethernet (ETH) Tx channel.
These constants define the possible status returned by the Ethernet (ETH) channel HAL layer. They are typically used as bitmasks, allowing multiple status conditions to be reported simultaneously.
Note
These status are reported through registered
p_tx_complete_cbto the user.Defines
-
HAL_ETH_TX_STATUS_TTSS
(1UL
<<
17U)
¶
-
Tx Timestamp Status. This status indicates that a timestamp has been captured for the corresponding transmit packet.
-
HAL_ETH_TX_STATUS_LD
(1UL
<<
28U)
¶
-
Last Descriptor. This status indicates indicates that the buffers to which this descriptor is pointing are the last segment of the packet.
-
HAL_ETH_TX_STATUS_FD
(1UL
<<
29U)
¶
-
First Descriptor. This status indicates that this descriptor contains the first segment of the packet.
-
HAL_ETH_TX_STATUS_INVALID
(1UL
<<
31U)
¶
-
Tx Buffer Status. This status indicates that the buffer which this descriptor is pointing is dirty (not yet transmitted).
-
HAL_ETH_TX_STATUS_TTSS
(1UL
<<
17U)
¶
Note
This section is not available for STM32C542xx.
Ethernet Tx Packet Control Attributes ¶
Note
This section is not available for STM32C562xx.
- group ETH_Tx_Packet_Control_Attributes
-
Constants to configure controls for Ethernet transmit (Tx) packets.
Defines
-
HAL_ETH_TX_PKT_CTRL_CSUM
0x00000001UL
¶
-
Enable IP header checksum calculation and insertion.
When this control is enabled, the hardware will automatically calculate and insert the IP header checksum for the outgoing packet.
-
HAL_ETH_TX_PKT_CTRL_SAIC
0x00000002UL
¶
-
Enable MAC Source Address (SA) Insertion Control.
When this control is enabled, the hardware will insert or replace the source MAC address in the outgoing packet as per the configuration.
-
HAL_ETH_TX_PKT_CTRL_VLANTAG
0x00000004UL
¶
-
Enable VLAN Tag Insertion or Replacement.
When this control is enabled, the hardware will insert or replace the VLAN tag in the outgoing packet according to the specified VLAN configuration.
-
HAL_ETH_TX_PKT_CTRL_INNERVLANTAG
0x00000008UL
¶
-
Enable Inner VLAN Tag Insertion or Replacement.
When this control is enabled, the hardware will insert or replace the inner VLAN tag (for double-tagged or Q-in-Q packets) in the outgoing packet.
-
HAL_ETH_TX_PKT_CTRL_CRCPAD
0x00000020UL
¶
-
Enable MAC CRC and Padding Insertion.
When this control is enabled, the hardware will automatically append the CRC and perform padding to meet the minimum Ethernet frame size requirements.
-
HAL_ETH_TX_PKT_CTRL_CSUM
0x00000001UL
¶
Note
This section is not available for STM32C542xx.
ETH system bus burst length ¶
Note
This section is not available for STM32C562xx.
- group ETH_Bus_Burst_Length
-
Defines
-
HAL_ETH_BUS_BURST_LEN_4_BEAT
ETH_DMASBMR_BLEN4
¶
-
System Bus Burst Length 4 beats
-
HAL_ETH_BUS_BURST_LEN_8_BEAT
ETH_DMASBMR_BLEN8
¶
-
System Bus Burst Length 8 beats
-
HAL_ETH_BUS_BURST_LEN_16_BEAT
ETH_DMASBMR_BLEN16
¶
-
System Bus Burst Length 16 beats
-
HAL_ETH_BUS_BURST_LEN_32_BEAT
ETH_DMASBMR_BLEN32
¶
-
System Bus Burst Length 32 beats
-
HAL_ETH_BUS_BURST_LEN_64_BEAT
ETH_DMASBMR_BLEN64
¶
-
System Bus Burst Length 64 beats
-
HAL_ETH_BUS_BURST_LEN_128_BEAT
ETH_DMASBMR_BLEN128
¶
-
System Bus Burst Length 128 beats
-
HAL_ETH_BUS_BURST_LEN_256_BEAT
ETH_DMASBMR_BLEN256
¶
-
System Bus Burst Length 256 beats
-
HAL_ETH_BUS_BURST_LEN_4_BEAT
ETH_DMASBMR_BLEN4
¶
Note
This section is not available for STM32C542xx.
ETH PMT control flags ¶
Note
This section is not available for STM32C562xx.
- group ETH_PMT_Triggers
-
Constants for configuring Power Management Timer (PMT) control flags for Ethernet.
Defines
-
HAL_ETH_PMT_CTRL_FWD_WAKEUP_PKT
ETH_MACPCSR_RWKPFE
¶
-
Enable Remote Wake-up Packet Forwarding.
When this control is set, the Ethernet controller will forward remote wake-up packets to the host system.
See also
-
HAL_ETH_PMT_CTRL_TRIG_MAGIC_PKT
ETH_MACPCSR_MGKPKTEN
¶
-
Enable Magic Packet detection in power down mode.
When this control is set, the Ethernet controller will detect Magic Packets and trigger a wake-up event while in power down mode.
See also
-
HAL_ETH_PMT_CTRL_TRIG_RWKUP_PKT
ETH_MACPCSR_RWKPKTEN
¶
-
Enable Wake Up Packet detection in power down mode.
When this control is set, the Ethernet controller will detect remote wake-up packets and trigger a wake-up event while in power down mode.
See also
-
HAL_ETH_PMT_CTRL_TRIG_GLBL_UCAST
ETH_MACPCSR_GLBLUCAST
¶
-
Enable Global Unicast packet detection in power down mode.
When this control is set, the Ethernet controller will detect global unicast packets and trigger a wake-up event while in power down mode.
See also
-
HAL_ETH_PMT_CTRL_TRIG_ALL
(ETH_MACPCSR_RWKPFE | ETH_MACPCSR_MGKPKTEN | \
ETH_MACPCSR_RWKPKTEN | ETH_MACPCSR_GLBLUCAST)
¶
-
Enable detection of Magic, Remote, and Global Unicast wake-up packets in power down mode.
This control enables simultaneous detection of Magic Packets, remote wake-up packets, and global unicast packets for wake-up events while in power down mode.
See also
-
HAL_ETH_PMT_CTRL_FWD_WAKEUP_PKT
ETH_MACPCSR_RWKPFE
¶
Note
This section is not available for STM32C542xx.
ETH LPI controls ¶
Note
This section is not available for STM32C562xx.
- group ETH_LPI_Controls
-
Constants for configuring Low Power Idle (LPI) controls for Ethernet.
Defines
-
HAL_ETH_LPI_CTRL_TX_CLK_STOP_ENABLE
ETH_MACLCSR_LPITCSE
¶
-
Enable Tx Clock Stop in LPI mode.
When this control is set, the Tx clock can be stopped after entering Tx LPI (Low Power Idle) mode. If the RGMII interface is selected, the Tx clock is still required for transmitting the LPI pattern.
See also
-
HAL_ETH_LPI_CTRL_TX_AUTOMATE_ENABLE
ETH_MACLCSR_LPITXA
¶
-
Enable Tx LPI Automate.
When this control is set, the MAC will enter LPI mode only after all outstanding packets (in the core) and pending packets (in the application interface) have been transmitted.
See also
-
HAL_ETH_LPI_CTRL_TX_CLK_STOP_ENABLE
ETH_MACLCSR_LPITCSE
¶
Note
This section is not available for STM32C542xx.
ETH MDIO command attributes ¶
Note
This section is not available for STM32C562xx.
- group ETH_MDIO_Command_Attributes
-
Constants for configuring MDIO (Management Data Input/Output) command attributes for Ethernet.
Defines
-
HAL_ETH_MDIO_FEAT_PSE
ETH_MACMDIOAR_PSE
¶
-
Enable MDIO preamble suppression feature.
Selects the preamble length for the MDIO frame.
Feature disabled: 32-bit preamble (standard, recommended for compatibility)
Feature enabled : 1-bit preamble (suppressed, for PHYs that support preamble suppression)
See also
-
HAL_ETH_MDIO_FEAT_BTB
ETH_MACMDIOAR_BTB
¶
-
Enable MDIO back-to-back operation mode.
Controls whether MDIO operations are performed in back-to-back mode.
Feature disabled: Normal operation (default)
Feature enabled : Back-to-back operation (for consecutive MDIO transactions)
See also
-
HAL_ETH_MDIO_NTC_1_CYCLE
(1UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 1 cycle.
Sets the MDIO clock trimming to 1 cycle.
See also
-
HAL_ETH_MDIO_NTC_2_CYCLES
(2UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 2 cycles.
Sets the MDIO clock trimming to 2 cycles.
See also
-
HAL_ETH_MDIO_NTC_3_CYCLES
(3UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 3 cycles.
Sets the MDIO clock trimming to 3 cycles.
See also
-
HAL_ETH_MDIO_NTC_4_CYCLES
(4UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 4 cycles.
Sets the MDIO clock trimming to 4 cycles.
See also
-
HAL_ETH_MDIO_NTC_5_CYCLES
(5UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 5 cycles.
Sets the MDIO clock trimming to 5 cycles.
See also
-
HAL_ETH_MDIO_NTC_6_CYCLES
(6UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 6 cycles.
Sets the MDIO clock trimming to 6 cycles.
See also
-
HAL_ETH_MDIO_NTC_7_CYCLES
(7UL
<<
ETH_MACMDIOAR_NTC_Pos)
¶
-
Trim MDIO clock by 7 cycles.
Sets the MDIO clock trimming to 7 cycles.
See also
-
HAL_ETH_MDIO_FEAT_PSE
ETH_MACMDIOAR_PSE
¶
Note
This section is not available for STM32C542xx.
ETH remote wake-up filter number ¶
Note
This section is not available for STM32C562xx.
- group ETH_RWK_Packet_Filters_Number
-
Constants defining the number of remote wake-up (RWK) packet filters supported by the Ethernet hardware.
Defines
-
HAL_ETH_RWK_FILT_PER_BLOCK
ETH_NB_OF_RWK_FILT_PER_BLOCK
¶
-
Number of remote wake-up (RWK) packet filters per filter block.
This constant specifies the maximum number of RWK packet filters that can be configured within a single filter block. Each filter can be programmed to match specific packet patterns for remote wake-up functionality.
See also
-
HAL_ETH_RWK_FILT_BLOCK_NUM
ETH_NB_OF_RWK_FILT_BLOCKS
¶
-
Number of available RWK filter blocks.
This constant defines the total number of filter blocks supported by the hardware for remote wake-up packet filtering. The total number of RWK filters is the product of HAL_ETH_RWK_FILT_PER_BLOCK and this value.
See also
See also
-
HAL_ETH_RWK_FILT_PER_BLOCK
ETH_NB_OF_RWK_FILT_PER_BLOCK
¶
Note
This section is not available for STM32C542xx.
ETH remote wake-up command list ¶
Note
This section is not available for STM32C562xx.
- group ETH_RWK_Filter_Commands
-
Constants for configuring the 4-bit filter command for remote wakeup filters.
Defines
-
HAL_ETH_RWK_FLT_CMD_ENABLE
(1UL
<<
0U)
¶
-
Enable filter i.
Bit 0: When set, enables filter i. If this bit is not set, filter i is disabled and will not participate in remote wakeup packet matching.
See also
See also
-
HAL_ETH_RWK_FLT_CMD_AND_PREVIOUS
(1UL
<<
1U)
¶
-
AND logic with previous filter.
Bit 1: When set, the result of the current filter is logically ANDed with the result of the previous filter. This allows for filter patterns longer than 32 bytes by splitting the mask among multiple filters. Multiple filters can be chained using this bit to create complex matching logic.
See also
See also
-
HAL_ETH_RWK_FLT_CMD_INVERSE_MODE
(1UL
<<
2U)
¶
-
Inverse mode for CRC16 hash function.
Bit 2: When set, reverses the logic of the CRC16 hash function signal, causing the filter to reject packets with a matching CRC16 value. This bit, in combination with HAL_ETH_RWK_FLT_CMD_AND_PREVIOUS, allows the creation of filter logic such as “Pattern 1 AND NOT Pattern 2” to reject a subset of remote wakeup packets.
See also
See also
-
HAL_ETH_RWK_FLT_CMD_MULTICAST
(1UL
<<
3U)
¶
-
Multicast address type selection.
Bit 3: Specifies the address type for the pattern.
When set, the pattern applies only to multicast packets.
When reset, the pattern applies only to unicast packets.
See also
See also
-
HAL_ETH_RWK_FLT_CMD_ENABLE
(1UL
<<
0U)
¶
Note
This section is not available for STM32C542xx.