5.7. Texas Instruments CPSW - emllCPSW
The parameters to the CPSW Link Layer are setup-specific.
The function CreateLinkParmsFromCmdLineCPSW()
in EcSelectLinkLayer.cpp
demonstrates how to initialize the Link Layer instance.
-
struct EC_T_LINK_PARMS_CPSW
Public Members
-
EC_T_LINK_PARMS linkParms
Common link parameters. Signature must be set to EC_LINK_PARMS_SIGNATURE_CPSW
-
EC_T_CPSW_TYPE eCpswType
CPSW type
-
EC_T_PHYINTERFACE ePhyInterface
PHY connection type
-
EC_T_LINK_PARMS linkParms
5.7.1. CPSW usage under Linux
Due to lacking unbind-feature of the CPSW driver, the target’s Kernel must not load the CPSW driver when starting. If the CPSW was built as a module, it can be renamed or removed to ensure, it never gets loaded. If it was compiled into the Kernel, the Kernel needs to be recompiled without it.
It is possible to use one CPSW port for Linux kernel (TCP/IP) and another CPSW port for EC-Master. To do this, the CPSW kernel driver must be patched.
Currently following Linux versions are supported:
linux-4.1.6 from TI Linux SDK 2.0
linux-4.4.4-rt11 from Lenze
linux-3.10.93-rt101 from Canon
Note
A patch for other Linux versions can also be created on request.
The patch needs:
Linux kernel with enabled CPSW driver.
Patch applied to Linux kernel.
EC_ETHERNET_PORT defined according to target in cpsw.c and davinci_mdio.c files.
Kernel must be rebuilt and installed
After that Linux will have only 1 Ethernet device, another can be used by EC-Master.
Note
EtherCAT ports should be used as “slave” since “master” is the Linux driver.