This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: Problems with LWIP / Ethernet communication on Profinet Device

Part Number: MCU-PLUS-SDK-AM243X

Hi TI experts,

we are running some tests with our AM243x firmware using Profinet on our device (SDK V8.4.0.17 - profinetdevice V2.2.4 prerelease).

During these tests we sometimes experience some problems with the Ethernet communication:

No LWIP based communication seems to work - neither TCP, ICMP or ARP. This state can be achieved right after startup as well as after some previous TCP / ICMP communication.

We enabled the following debug logs in the LWIP implementation to get some more information about the error:

#define NETIF_DEBUG                LWIP_DBG_ON
#define IP_REASS_DEBUG             LWIP_DBG_ON
#define ICMP_DEBUG                 LWIP_DBG_ON
#define ETHARP_DEBUG               LWIP_DBG_ON

In our test run we had the following setup

Device connected to a PC

In that test run the log during startup looks totally valid:

[1362][]  DebugP: netif: netmask of interface
[1362][]  DebugP: netif: GW address of interface
[1362][]  DebugP: netif_set_ipaddr: netif address being changed
[1362][]  DebugP: netif: added interface ho IP
[1362][]  DebugP:  addr
[1362][]  DebugP: 192.168.100.2
[1362][]  DebugP:  netmask
[1362][]  DebugP: 255.255.255.0
[1362][]  DebugP:  gw
[1362][]  DebugP: 192.168.100.2
[1362][]  DebugP:
[1362][]  DebugP: netif: setting default interface ho
[1362][]  DebugP: etharp_request: sending ARP request.
[1362][]  DebugP: etharp_raw: sending raw ARP packet.
[1362][]  DebugP: ethernet_output: sending packet 7010f9e0
[2148][]  DebugP: etharp_timer
[2361][]  DebugP: etharp_timer
[3148][]  DebugP: etharp_timer
[3361][]  DebugP: etharp_timer
[3459][]  DebugP: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:78:2d:7e:14:0c:00, type:806
[3459][]  DebugP: etharp_update_arp_entry: 0.0.0.0 - 78:2d:7e:14:0c:00
[3459][]  DebugP: etharp_update_arp_entry: will not add non-unicast IP address to ARP cache
[3459][]  DebugP: etharp_input: incoming ARP request
[3459][]  DebugP: etharp_input: ARP request was not for us.
[3470][SoftTimerMgr0]  DebugP: etharp_request: sending ARP request.
[3470][SoftTimerMgr0]  DebugP: etharp_raw: sending raw ARP packet.
[3470][SoftTimerMgr0]  DebugP: ethernet_output: sending packet 7010f9e0
[3483][]  DebugP: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:78:2d:7e:14:0c:00, type:806
[3483][]  DebugP: etharp_update_arp_entry: 192.168.100.83 - 78:2d:7e:14:0c:00
[3483][]  DebugP: etharp_find_entry: found empty entry 0
[3483][]  DebugP: etharp_find_entry: no empty entry found and not allowed to recycle
[3483][]  DebugP: etharp_input: incoming ARP request
[3483][]  DebugP: etharp_input: ARP request was not for us.
[4148][]  DebugP: etharp_timer
[4171][]  DebugP: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:00:0f:69:ff:a1:03, type:806
[4171][]  DebugP: etharp_update_arp_entry: 192.168.100.3 - 00:0f:69:ff:a1:03
[4171][]  DebugP: etharp_find_entry: found empty entry 0
[4171][]  DebugP: etharp_find_entry: no empty entry found and not allowed to recycle
[4171][]  DebugP: etharp_input: incoming ARP request
[4171][]  DebugP: etharp_input: ARP request was not for us.
[4361][]  DebugP: etharp_timer
[4458][]  DebugP: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:78:2d:7e:14:0c:00, type:806
[4458][]  DebugP: etharp_update_arp_entry: 0.0.0.0 - 78:2d:7e:14:0c:00
[4458][]  DebugP: etharp_update_arp_entry: will not add non-unicast IP address to ARP cache
[4458][]  DebugP: etharp_input: incoming ARP request
[4458][]  DebugP: etharp_input: ARP request was not for us.

After successful startup we trigger a ping call from windows command line

We got the following Log:

[171361][]  DebugP: etharp_timer
[172148][]  DebugP: etharp_timer
[172361][]  DebugP: etharp_timer
[172939][]  DebugP: ethernet_input: dest:00:0f:69:ff:a1:78, src:78:2d:7e:14:0c:00, type:800
[172939][]  DebugP: icmp_input: ping
[172939][]  DebugP: ethernet_output: sending packet 700dd1e0
[173148][]  DebugP: etharp_timer
[173361][]  DebugP: etharp_timer
[173940][]  DebugP: ethernet_input: dest:00:0f:69:ff:a1:78, src:78:2d:7e:14:0c:00, type:800
[173940][]  DebugP: icmp_input: ping
[173940][]  DebugP: ethernet_output: sending packet 700dd1e0
[174148][]  DebugP: etharp_timer
[174361][]  DebugP: etharp_timer
[174942][]  DebugP: ethernet_input: dest:00:0f:69:ff:a1:78, src:78:2d:7e:14:0c:00, type:800
[174942][]  DebugP: icmp_input: ping
[174942][]  DebugP: ethernet_output: sending packet 700dd1e0
[175148][]  DebugP: etharp_timer
[175361][]  DebugP: etharp_timer
[175943][]  DebugP: ethernet_input: dest:00:0f:69:ff:a1:78, src:78:2d:7e:14:0c:00, type:800
[175943][]  DebugP: icmp_input: ping
[175943][]  DebugP: ethernet_output: sending packet 700dd1e0
[176148][]  DebugP: etharp_timer
[176361][]  DebugP: etharp_timer
[177148][]  DebugP: etharp_timer
[177361][]  DebugP: etharp_timer
[178148][]  DebugP: etharp_timer
[178361][]  DebugP: etharp_timer
[179148][]  DebugP: etharp_timer
[179361][]  DebugP: etharp_timer
[180148][]  DebugP: etharp_timer
[180361][]  DebugP: etharp_timer
[181148][]  DebugP: etharp_timer
[181361][]  DebugP: etharp_timer

If we wait some time and try to reach the device again via ping call nothing happens. The log is filled only with the etharp_timer log entries and it seems that the ethernet_input() function is not called by the "osal_task" instance (which still seems to be running in the task monitor).

DCP via PROFINET is still working in that situation.

Do you see any circumstances why ethernet_input() is not called anymore out of the "osal_task" context? We made sure that it's not called anymore by adding a log entry right after the ethernet_input() function entry.,

Best regards

Alex