2026-03-03 2:28 AM
I have a STM32H732 processor connected to a ethernet switch with port based VLAN support.
I use the processor to connect to two different interfaces which are separated in the switch.
I wanted to be able to access the same two TCP ports in the processor from both interfaces.
So I configured ETH_L3_FILTER_0 and ETH_L3_FILTER_1 with the two different IP-addresses used on the two interfaces
And the ETH_L4_FILTER_0 and ETH_L4_FILTER_1 with the two different ports.
But that did not work as I hoped.
It looks like the L3_FILTER_0 and L4_FILTER_0 are used as one filter. and FILTER_1 as another.
And maybe that is as intented but it is not super clear in the documentation.
I may have to add that I have found and read...
Is this correct or is there perhaps a way to use the L3 and L4 as separate filters so that I can get four different filters allowing two IPs and two Ports in any combination of ports and IP?
Best regards
Solved! Go to Solution.
2026-03-04 6:22 AM
Hello @Bebbelin, and welcome to ST Community!
Your understanding is correct. The hardware pairs L3 and L4 filters into two combined filter contexts, not four independent ones. This means you cannot mix L3_FILTER_0 with L4_FILTER_1 or vice versa.
L3/L4 filters are mainly used for:
They are not strictly required to support multiple IPs and ports functionally. If your goal is simply to handle the same two TCP ports on two different IPs, you do not necessarily need L3/L4 hardware filtering. Instead, let your TCP/IP stack listen on:
The stack will distinguish flows by the 4-tuple (source IP, source port, destination IP, destination port) in software.
Best regards,
2026-03-03 4:14 AM
Have a look at Errata of your chip - you will find what works and what not and why.
Please mark as solution if you agree.
Thanks
Mike
2026-03-04 6:22 AM
Hello @Bebbelin, and welcome to ST Community!
Your understanding is correct. The hardware pairs L3 and L4 filters into two combined filter contexts, not four independent ones. This means you cannot mix L3_FILTER_0 with L4_FILTER_1 or vice versa.
L3/L4 filters are mainly used for:
They are not strictly required to support multiple IPs and ports functionally. If your goal is simply to handle the same two TCP ports on two different IPs, you do not necessarily need L3/L4 hardware filtering. Instead, let your TCP/IP stack listen on:
The stack will distinguish flows by the 4-tuple (source IP, source port, destination IP, destination port) in software.
Best regards,
2026-03-06 12:58 AM
Super thank you!
I disabled L3 and just made two L4 filters listening on the ports to get some basic filtering from the HW.