Part Number: AM2431
Hi TI Team,
I am currently implementing EtherCAT EoE on TI AM243x using FreeRTOS and lwIP. EtherCAT communication itself is working correctly and the device can reach OP state, but I am unable to get EoE communication working.
Environment:
TI AM243x MCU+
SDK: 11.01.00.19 Industrial Communications
SDK: 2025.00.00.08
OS: FreeRTOS
TCP/IP Stack: lwIP
EtherCAT: PRU-ICSSG
EtherCAT Master: CODESYS Control for Linux ARM64SL
My network topology is: PC (192.168.1.x)
|
Switch
|
PLC / CODESYS (192.168.1.101)
|
EtherCAT
|
AM243x EoE
IP: 172.16.1.200
CODESYS EoE configuration:
Virtual Ethernet Port: Enabled
Virtual MAC: 02-01-05-10-03-E9
IP Address: 172.16.1.200
Subnet Mask: 255.255.255.0
Gateway: 172.16.1.1
On the Linux PLC, I configured tap0 as:
ip link set tap0 up
ip addr add 172.16.1.1/24 dev tap0
The routing table contains:
172.16.1.0/24 dev tap0 proto kernel scope link src 172.16.1.1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.101
EtherCAT itself is working correctly.
The AM243x EtherCAT SubDevice reaches OP state and PDO communication works correctly.
EC_API_SLV_mainLoopCyclic() is also running continuously.
For EoE, I registered the callbacks before EC_API_SLV_init() and EC_API_SLV_run():
EC_API_SLV_EoE_cbRegisterReceiveHandler(
pAppInstance_p->ptEcSlvApi,
EC_SLV_APP_EoE_SS_receiveHandler,
pAppInstance_p);
EC_API_SLV_EoE_cbRegisterSettingIndHandler(
pAppInstance_p->ptEcSlvApi,
EC_SLV_APP_EoE_SS_settingIndHandler,
pAppInstance_p);
My receive callback is:
bool EC_SLV_APP_EoE_SS_receiveHandler( void *pContext, uint16_t *pData, uint16_t size) { DebugP_log("EoE RECEIVE CALLBACK size=%u\r\n", size);
... gnetif.input(p, &gnetif);
... return true; }
I also initialize lwIP and start an HTTP server on TCP port 80.
The problem is that EC_SLV_APP_EoE_SS_receiveHandler() is never triggered.
For example, from the Linux PLC I run: ping -c 3 172.16.1.200
but the result is: From 172.16.1.1 Destination Host Unreachable
ping: send
msg: No route to host
There is also no "EoE RECEIVE CALLBACK" message on the AM243x UART.
The tap0 interface is UP and configured with:
tap0: 172.16.1.1/24 and the route to 172.16.1.0/24 correctly uses tap0.
So currently I have:
EtherCAT state machine working
EtherCAT reaches OP
PDO communication working
EC_API_SLV_mainLoopCyclic() running
EoE receive callback registered
EoE setting callback registered
lwIP initialized
HTTP server initialized
Linux tap0 created and UP
tap0 configured as 172.16.1.1/24
AM243x configured in CODESYS with EoE IP 172.16.1.200
However, EoE communication still does not work and the AM243x EoE receive callback is never called.