Showing results for 
Search instead for 
Did you mean: 

Ethernet HAL Driver reworked by ST and available in 22Q1 (preview now available on GitHub)

ST Employee

Multiple feedbacks reported around Ethernet HAL driver and applications on STM32Cube FW have been acknowledged and analyzed. Many of them were related to RX packets management, to DMA management, or to overall performance. A summary list of tickets on GitHub and forum is provided below for reference.

We apologize for the time it took to provide an adapted solution. We are changing support model to provide more dynamic updates in the future (mainly leveraging GitHub mechanisms).

Today, based on the received feedbacks, the Ethernet HAL driver has been reworked to fix most known issues, enhance performance, and add some missing features.

The reworked Ethernet HAL driver (along with updated applications) is being deployed on STM32CubeH7, STM32CubeF4 and STM32CubeF7 FW packages.

Official publication dates are aligned with maintenance dates: 22Q1 for STM32H7 and STM32F4, and 22Q2 for STM32F7.

Before the official publication: the reworked Ethernet HAL driver and applications are shared on GitHub ( in the form of a pull request, available for everyone for use and review. Feedbacks, comments, enhancements, and proposals are more than welcome.

After the official publication: more frequent updates are planned and will be anticipated on GitHub.

The reworked Ethernet HAL driver brings multiple changes and a compatibility break vs. legacy Ethernet HAL driver. Main changes are listed here:

  • Add support for PTP and ARP.
  • Rework packets reception and buffers allocation for a better integration and performance.
  • Rework packets transmission and buffers allocation (using Interrupts instead of polling and prevent packets lock during transmission).
  • Enhance DMA management.
  • Decouple Ethernet HAL driver from PHY driver.
  • Enhance maximum throughput in RX (94Mbs) and TX (92Mbs).
  • Enhance footprint (new driver size is 6% less than legacy driver).
  • Full integration with LwIP (with and without FreeRTOS) and NetXDuo with ThreadX.
  • Rework applications for STM32CubeH7 FW, STM32CubeF4 FW and STM32CubeF7 FW to align with new Ethernet HAL driver.
  • MISRA-C 2012, code coverage analysis, static code analysis and robustness validation added.

The new Ethernet HAL driver is supported by STM32CubeMX release of 22Q1 on STM32H7 and STM32F4. Support on STM32F7 follow in 22Q2.

Since the new Ethernet HAL driver brings a compatibility break, existing projects using it shall be updated accordingly. A step-by-step guide for how to update existing projects is shared in this forum and soon in a dedicated Wiki page. A pull request on STM32H7 CubeFW LwIP projects is also provided here to show how modifications are done.

Also, users with existing projects, who don’t want or need to move to the new Ethernet HAL driver can keep their projects running by pointing to legacy driver that will be available in a dedicated folder in future STM32Cube FW packages.

We warmly thank community contributors, and especially @alister​ and @Piranha​ who did a great job synthesizing encountered issues and feedbacks. We keep looking for your feedbacks to continue enhancing and adapting for your needs.

General FAQ :

  • Is new Ethernet HAL driver compatible with legacy driver?
    • New driver is not compatible with the legacy driver.
  • Is it mandatory to switch to new Ethernet HAL driver?
    • In order to benefit from better performance and reliability, it is preferred to switch to the new driver. But it is also possible to keep legacy driver that will still be available in STM32Cube FW packages.
  • Are all existing projects in STM32Cube FW package updated to use the new Ethernet HAL driver ?
    • All LwIP projects on STM32H7, STM32F4 and STM32F7 STM32Cube FW packages are updated.
    • Other projects using Ethernet HAL driver like demos or mbedTLS are kept using legacy driver.
  • Shall I expect issues with STM32CubeMX when generating code for ETH HAL ?
    • Yes, STM32CubeMX 6.5.0 and newer support the new architecture of the ETH HAL and so do not generate the legacy structures. It means a project generated with that version will not be compatible with legacy ETH HAL.
    • Specifically on X-CUBE-AZRTOS-H7, X-CUBE-AZRTOS-F7 and X-CUBE-AZRTOS-F4, it is not possible to use STM32CubeMX 6.5.0 for ETH without a compatibility break. An updated version for each package is being released to align them with new ETH HAL driver.

Detailed List of tickets:

Here below a list of main ticket that have been taken into consideration and fixed in the new Ethernet HAL driver and applications. Some of them come from community (very well summarized in a single post), some others are logged on GitHub, and others were logged on internal bug tracking system (the items without hyperlink):

81088 [ETH] RM0433 v6 faults and missing details on ETHERNET related sections 

100608 [ETH]: Need to add new fields in the ETH_TxDescListTypeDef

79181 [STM32H7] ETH Ingress correction register

75481 Ticket 75481 - Ethernet PPS functionality clarification

62100 ARPEN support in Ethernet Driver

79615 Ethernet: Enable and handle the DMA

67970 Read Buffer Underflow interrupt

91624 SCB_InvalidateDCache_by_Addr alignment in ethernetif.c

97885 Question about CMSIS EMAC driver

100109 [HAL_ETH] By default MMC interrupt is not handled

83608 LWiP Interrupt and Through Put is Low

81685 [MW_LwIP] Can't ping device with mDNS feature

81312 Length value issue in HAL_ETH_GetReceivedFrame_IT

41452 MBED / Ethernet: inconsistent transmission issue

74243 Add LWIP examples for DISCO-H747I

48259 [ETH] Support of PTP feature in the driver

101731 [LwIP/ETH/MSP][ExamplesMX] Missing initialization to 0 for most local variables of

67276 Several bugs in ethernetif.c: giving back Rx descriptor to DMA before packet was processing by LWIP

91976 LWIP HAL project race condition

91624 SCB_InvalidateDCache_by_Addr alignment in ethernetif.c

108075 Ethernet not working with high AHB/APB2 divider

62100 ARPEN support in Ethernet Driver

67970 Ethernet: Enable and handle the DMA Read Buffer Underflow interrupt

104729 [GitHub] Wrong HSE_VALUE in NUCLEO-H743ZI LwIP_HTTP_Server_Netconn_RTOS application

101385 [ETH] Same issue as ticket 40298 but in STM32CubeH7 v1.8.0

101620 Support of MW_AzureRTOS and associated applications

63844 [LwIP License update] Update the Licenses (in readme and source files)

106013 [ETH] Ping max buffer size

108010 Ethernet HAL workaround against Ping Flood issue

108675 Ethernet erroneous data received in RMII configuration

108674 Ethernet erroneous data received in RMII configuration

108670 Ethernet erroneous data received in RMII configuration

Forum (including multiple forum tickets)





Associate II

"A step-by-step guide for how to update existing projects is shared in this forum and in a dedicated Wiki page (link)"

Could you provide actual link, please. 🙂

Pavel A.
Evangelist III

Preview of examples available in commit 37b43ec1f32807de77a0cb1af71542c6ba4f35b9 on github





ST Employee

Hi @Community member​ , Wiki page will be updated only at the date of the official release, but you can find a document attached explaining the projects update steps.

Hi @Pavel A.​ , Yes a pull request on STM32H7 CubeFW LwIP projects is available to show more in details how it is done here:

Pavel A.
Evangelist III

@MWB_CHa​ Thank you for letting us see the document.

So, for transmit, HAL_ETH_Transmit_IT will completely replace HAL_ETH_Transmit, the interrupt always must be enabled?

Could you comment on changes of memory allocated for LwIP pool and buffers? (changes in GNU link scripts, lwipopts.h, FreeRTOS memory allocation?)

Rework of of the RX API looks good, and in the same direction as the FreeRTOS+ driver variant.

Associate II

Any guide on how to apply changes when AzureRTOS (NETXDUO) is used on H7?

I apply changes from Git on the HAL driver but some files from AzureRTOS are reporting missing functions etc.


Hi, Pavel A.

where to download the examples using the new ethernet driver?

I downloaded and tested the new examples but the ethernet driver doesn't seem to be different from the current driver. Still not using interrupt for ethernet for example.

Associate III


Can you already tell in what week the new STM32CubeH7 with the new ethernet driver will be released?