cancel
Showing results for 
Search instead for 
Did you mean: 

Dual port ethernet switch interfacing in STM32H743

PNaph.2
Associate II

Hi Team,

We are using STM32H743 microcontroller (as a server) interfaced with LAN9353/KSZ8863 with two ethernet ports, one port connected to PC (as 1st client) and another port connected to embedded board(as 2nd client). Till now we are able to check PING command response with both the ports simultaneously.

But when we try to connect with server, the client which is connected at port1 only connects with server, client on port2 is not connecting to server.

We are not getting why the client on port2 is not able to connect, is this because of some IP routing or something else?

We are using LwIP network stack for TCP/IP communication. For both the ports we have created two separate network interfaces with same/different IP addresses.

Does LwIP supports two network interfaces simultaneously? Or do STM32 have any example on dual port ethernet switch?

We would like to know your guidance on the above points.

Thank you.

2 REPLIES 2
Pavel A.
Evangelist III

>For both the ports we have created two separate network interfaces with same/different IP addresses.

Same or different?

KSZ8863 is a switch, it handles routing among two external ports and the internal (host) port.

So you need only one LwIP interface of the STM32 side, and only one IP address.

Thank you for the updates on the query.

>Same or different?

Currently we have kept the same IP addresses for both the network interfaces.

>So you need only one LwIP interface of the STM32 side, and only one IP address.

Means just one network interface is required to handle the packets from both the ports and with one MAC address for STM32 MAC and lwip netif MAC address.

Additionally, STM32 supports 3 additional MAC addresses (MAC1 to MAC3 registers). Where can we use these other MAC addresses? Currently we are using only one MAC address stored in MAC0 register.

Thank you