Dual port ethernet
Hey,
I use STM32H745, I created ETH communication on the M4 core and it works well.
Now I want ETH communication with two ports, one port per core.
It is possible?
In each core before the main while, I do:
MX_LWIP_Init();
/* create new tcp pcb */
tcpb = tcp_new();
err_t err;
if (tpcb != NULL)
{
//err_t err;
/* bind echo_pcb to IP and PORT (ECHO protocol) */
err = tcp_bind(tpcb, &ipaddr, SysIP.PORT);
if (err == ERR_OK)
{
/* start tcp listening for echo_pcb */
tcpb = tcp_listen(tcpb);
/* initialize LwIP tcp_accept callback function */
tcp_accept(tpcb, PC_tcp_accept);
}
else
{
/* deallocate the pcb */
memp_free(0, tpcb);
}
}
And inside the main while, I execute MX_LWIP_Process();
For M4 core: SysIP.PORT == 4949.
For M7 core: SysIP.PORT == 4950.
IP ADDRESS, NETMASK ADDRESS and GATEWAY ADDRESS are the same for both cores.
I have no ping at all when I try to create this way.
What am I doing wrong? What should I do differently? Need to change something in CubeMX?
Thanks for the helpers!
