Reputation: 126
We have a STM32F7 with LAN9354 3-port switch on our board. I created a custom PHY driver for the LAN device based off a similar LAN chip. In general, networking works. We can setup static IP, ping both to and from the board, also UDP connection is good.
When I add a second IP instance using nx_ip_create, only the second IP address is accessible. If I swap the code around (create ip1 before ip0), then the second IP address is only available. When I say 'available', I mean through ping. If I use arp command on my Raspberry PI, I can see both IP addresses with the same MAC address.
This is not the exact code, just a portion. The remainder of the code properly sets up pointer allocated from byte pool, enabled icmp for both instances, arp, etc. without errors.
ret = nx_ip_create(&IpInstance0, "NetX IP Instance 0", IP_ADDRESS(10,24,129,49), 0xFFFFF000,
&EthPool, nx_stm32_eth_driver,
pointer, 2 * DEFAULT_MEMORY_SIZE, DEFAULT_PRIORITY);
ret = nx_ip_create(&IpInstance1, "NetX IP Instance 1", IP_ADDRESS(10,24,129,50), 0xFFFFF000,
&EthPool, nx_stm32_eth_driver,
pointer, 2 * DEFAULT_MEMORY_SIZE, DEFAULT_PRIORITY);
I've upgraded to the latest release of NetX Duo from Eclipse Foundation. No difference.
Upvotes: 0
Views: 128