cancel
Showing results for 
Search instead for 
Did you mean: 

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

AKali
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
ASEHST
ST Employee

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".

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

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.

 

ASEHST
ST Employee

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
Associate II

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

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