cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling IGMP disables reception of broadcast messages / V1.5.0

ES1979
Associate

We have run into an issue with the NetXduo driver in V1.5.0 for the STM32H5 series (and maybe others, we did not check).

What

When IGMP is enabled (to allow reception of multicast messages), the reception of broadcast messages gets disabled. This breaks basic network functionality like ARP, making the device unreachable for others on the network.

Why

In the NetX driver (Middlewares/ST/netxduo/common/drivers/ethernet/nx_stm32_eth_driver.c), there is a structure called FilterConfig. Line 1500 sets the member FilterConfig.BroadcastFilter to ENABLE - which will be interpreted by the HAL to configure the broadcast filter in the ETH preipheral (Bit 5/DBF in register ETH_MACPFR on the STM32H573 used here).

The structure is not used until a call to nx_igmp_enable() trickles down to _nx_driver_hardware_multicast_join() in the driver, at which point a different bit (to allow multicast reception) is flipped and the configuration is applied. Now multicast works, but pretty much nothing else.

Possible Solution

While there may be scenarios where disabling broadcast reception is desired, it usually isn't. Therefore, the initialization of FilterConfig.BroadcastFilter in line 1500 should be changed from ENABLE to DISABLE, reflecting the reset value of the respective bit.

4 REPLIES 4
hansnaert
Associate II

thanks

Searching a two days after problems when changing from CubeMX MCU package for F7 series from 1.17.2 to 1.17.3

Seems the same issue:

Screenshot 2025-08-01 090757.pngScreenshot 2025-08-01 090735.png

martin613
Associate

Hi,

same problem exists on H7.
I'm working on a project using FW_H7 V1.13.0 and NetXDuo 6.4.0

I have checked HAL_ETH_SetMACFilterConfig() against Reference Manuael RM0433 Rev.8. This function is correctly implemented: BroadcastFilter == ENABLE sets Bit5, which blocks all incoming broadcast packets.

The issue is in nx_stm32_eth_driver.c in _nx_driver_hardware_initialize()

Here BroadcastFilter is initialized to ENABLE, which does not make any sense to me, because basic network functionality will not work as described above.

From my point of view, this should be changed to DISABLE in a next realase.

BroadcastFilter == ENABLE means broadcasts are enabled - this is what everyone wants.

It is assigned to ENABLED in _nx_driver_hardware_initialize().

But @hansnaert possibly found a bug that resets this flag when the current filter is read.

The meaning of bit 5 is INVERSED: when 1 it blocks broadcasts:

PavelA_0-1780105722916.png

(from STM32H7 RM) 

So, with the bug, if the global FilterConfig in nx_stm32_eth_driver.c were  modified by HAL_ETH_GetMACFilterConfig() - what I don't see there - then FilterConfig.BroadcastFilter would be cleared by mistake. Again, I don't see this bug in the current version of ETH driver.

hansnaert
Associate II

@Pavel A., indeed, with the current version of the drivers it seems solved for the F7 series also.