Skip to main content
AKali
Associate
May 17, 2024
Solved

How to paththrough ethernet frames via two STM32H7 boards (HW MAC filtering and configuration)?

Hi, I'm trying to transmit Ethernet frame received by STM32H7[0] (passed this packet via serial) to STM32H7[1] to output on STM32H7[1] Ethernet. Ethernet packets input and output operates well if I act just with single controller, but looks like Ethernet packets can't passed to out.
I think the problem on STM32H7 hardware MAC configuration as I've tried to pass Ethernet packets with differ hardware address .
My efforts to configure Ethernet HAL gave no result:

 

 

 

 

 ...
 FilterConfig.PromiscuousMode = 1;
 FilterConfig.HashUnicast = 0;
 FilterConfig.HashMulticast = 0;
 FilterConfig.DestAddrInverseFiltering = 0;
 FilterConfig.PassAllMulticast = 0;
 FilterConfig.BroadcastFilter = 1;
 FilterConfig.ControlPacketsFilter = 0x03;
 FilterConfig.SrcAddrInverseFiltering = 0;
 FilterConfig.SrcAddrFiltering = 0;
 FilterConfig.HachOrPerfectFilter = 0;
 FilterConfig.ReceiveAllMode = 1;
 HAL_ETH_SetMACFilterConfig(&EthHandle, &FilterConfig);
 ...

 

 

 

 

Praying for your help, thanks for advance.

This topic has been closed for replies.
ASEHSTBest answer
ST Employee
May 24, 2024

Hello @AKali,

Your current Ethernet filter configuration is set to allow the controller to receive all frames. Could you please confirm that each Ethernet interface on your network has a unique MAC address? Identical MAC addresses on multiple devices can cause conflicts and disrupt network communication. 

Additionally, please ensure that the Ethernet frames you send contain the correct destination MAC address.

 

With Regards,

"If your question is answered, please close this topic by clicking ""Accept as Solution""."

4 replies

Pavel A.
May 17, 2024

Do these two  STM32H7s have assigned different (and valid) MAC addresses?  Please don't take offense but it happens. Even in promiscuous mode the own MAC addresses should be set correctly.

Also, look in the errata, IIRC there's something about address filtering.

 

ASEHSTBest answer
ST Employee
May 24, 2024

Hello @AKali,

Your current Ethernet filter configuration is set to allow the controller to receive all frames. Could you please confirm that each Ethernet interface on your network has a unique MAC address? Identical MAC addresses on multiple devices can cause conflicts and disrupt network communication. 

Additionally, please ensure that the Ethernet frames you send contain the correct destination MAC address.

 

With Regards,

"If your question is answered, please close this topic by clicking ""Accept as Solution""."
AKali
AKaliAuthor
Associate
May 27, 2024

@ASEHST @Pavel A. Thank you guys. MAC filter has really configured right. I've solved application code related issue to fix my issue...

CRoch.2
Associate II
October 11, 2024

Hi AKali,

I am trying to do the same, send MAC frames without TCP/UDP protocol, just initialize hardware and send frames, but I am not able, I am now sure how to initialize and configure. Could you please share your solution?

Thank you in advance

Best Regards