cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling multicast reception and transmission on the STM32H7 series

JvHB
Associate

Dear all,

I am having trouble getting multicast reception working on the STM32H7 MCU's, specifically the STM32H757. I need this to implement PTP.

I have used the STM32H7 ethernet page to get a working project using STM32CubeMX and I can successfully send and receive unicast packets.

I have made the following modifications to the project to try and get multicast working:

  • Enable IGMP & multicast in CubeMX (LWIP_IGMP=1, LWIP_MULTICAST_TX_OPTIONS=1, MEMP_NUM_IGM_GROUP=8)
  • Call igmp_joingroup() with the multicast IP address.
  • Enabled PassAllMulticast and PromiscuousMode with a call to HAL_ETH_SetMACFilterConfig() per some other posts on this forum
  • OR NETIF_FLAG_IGMP to the netif flags.

These modifications were enough to get it working on the STM32F7 series, but not on the STM32H7. The SPI bus on the F7 series is unfortunately too slow for my application, so I need the H7.

Can someone advise me on further modifications required to get multicast working?

Kind regards,

Jos

1 REPLY 1
ingep
Associate

I had a similar problem receiving multicast when migrating from STM32F7 to STM32H7. My solution was binding the socket to IP_ADDR_ANY instead if the interface IP-address:

netconn_bind(conn, IP_ADDR_ANY, port);

From LwIP CHANGELOG 2.0.1 :

> * udp.c: fixed bug #49662: multicast traffic is now only received on a UDP PCB

>  (and therefore on a UDP socket/netconn) when the PCB is bound to IP_ADDR_ANY