When I tested the IGH master station using the i.MX 8M Mini LPDDR4 EVK development board, I encountered the following issues. When master station MASTER0-DEVICE configured as “generic”,everything is normal,slave can be detected. However ,When master station MASTER0-DEVICE configured as “fec” but it cannot run. The experimental results are as follows.
root@imx8mm-lpddr4-evk:/# cat /etc/ethercat.conf
#------------------------------------------------------------------------------
#
# EtherCAT master configuration file for use with ethercatctl.
#
# $Id$
#
#------------------------------------------------------------------------------
#
# Master devices.
#
# The MASTER<X>_DEVICE variable specifies the Ethernet device for a master
# with index 'X'.
#
# Specify the MAC address (hexadecimal with colons) of the Ethernet device to
# use. Example: "00:00:08:44:ab:66"
#
# The broadcast address "ff:ff:ff:ff:ff:ff" has a special meaning: It tells
# the master to accept the first device offered by any Ethernet driver.
#
# The MASTER<X>_DEVICE variables also determine, how many masters will be
# created: A non-empty variable MASTER0_DEVICE will create one master, adding a
# non-empty variable MASTER1_DEVICE will create a second master, and so on.
#
MASTER0_DEVICE="00:04:9f:06:1b:63"
#MASTER1_DEVICE=""
#
# Ethernet driver modules to use for EtherCAT operation.
#
# Specify a non-empty list of Ethernet drivers, that shall be used for EtherCAT
# operation.
#
# Except for the generic Ethernet driver module, the init script will try to
# unload the usual Ethernet driver modules in the list and replace them with
# the EtherCAT-capable ones. If a certain (EtherCAT-capable) driver is not
# found, a warning will appear.
#
# Possible values: 8139too, e100, e1000, e1000e, r8169, fec, enetc, dpaa1, generic.
# Separate multiple drivers with spaces.
#
# Note: The e100, e1000, e1000e, fec and r8169 drivers are not built by default.
# Enable them with the --enable-<driver> configure switches.
#
DEVICE_MODULES="generic"
#
# Flags for loading kernel modules.
#
# This can usually be left empty. Adjust this variable, if you have problems
# with module loading.
#
#MODPROBE_FLAGS="-b"
#------------------------------------------------------------------------------
root@imx8mm-lpddr4-evk:/# ethercat slaves
0 1:0 PREOP + IS620N_ECAT_v2.5.7
When master station MASTER0-DEVICE configured as “fec” ,as flows
root@imx8mm-lpddr4-evk:~# cat /etc/ethercat.conf
#------------------------------------------------------------------------------
#
# EtherCAT master configuration file for use with ethercatctl.
#
# $Id$
#
#------------------------------------------------------------------------------
#
# Master devices.
#
# The MASTER<X>_DEVICE variable specifies the Ethernet device for a master
# with index 'X'.
#
# Specify the MAC address (hexadecimal with colons) of the Ethernet device to
# use. Example: "00:00:08:44:ab:66"
#
# The broadcast address "ff:ff:ff:ff:ff:ff" has a special meaning: It tells
# the master to accept the first device offered by any Ethernet driver.
#
# The MASTER<X>_DEVICE variables also determine, how many masters will be
# created: A non-empty variable MASTER0_DEVICE will create one master, adding a
# non-empty variable MASTER1_DEVICE will create a second master, and so on.
#
MASTER0_DEVICE="00:04:9f:06:1b:63"
#MASTER1_DEVICE=""
#
# Ethernet driver modules to use for EtherCAT operation.
#
# Specify a non-empty list of Ethernet drivers, that shall be used for EtherCAT
# operation.
#
# Except for the generic Ethernet driver module, the init script will try to
# unload the usual Ethernet driver modules in the list and replace them with
# the EtherCAT-capable ones. If a certain (EtherCAT-capable) driver is not
# found, a warning will appear.
#
# Possible values: 8139too, e100, e1000, e1000e, r8169, fec, enetc, dpaa1, generic.
# Separate multiple drivers with spaces.
#
# Note: The e100, e1000, e1000e, fec and r8169 drivers are not built by default.
# Enable them with the --enable-<driver> configure switches.
#
DEVICE_MODULES="fec"
#
# Flags for loading kernel modules.
#
# This can usually be left empty. Adjust this variable, if you have problems
# with module loading.
#
#MODPROBE_FLAGS="-b"
#------------------------------------------------------------------------------
root@imx8mm-lpddr4-evk:~# ethercat slaves
root@imx8mm-lpddr4-evk:~#
no servo driver is detected.
Using the official image of IMX8 MINI, the fec module has started running, but the main station still hasn't started and has been waiting for the device.
root@imx8mm-lpddr4-evk:~# ethercatctl restart
[ 30.905175] ec_master: loading out-of-tree module taints kernel.
[ 30.908677] EtherCAT: Master driver 1.5.2 unknown
[ 30.908995] EtherCAT: 1 master waiting for devices.
root@imx8mm-lpddr4-evk:~# ethercat master
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: 00:01:02:03:04:06 (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000
root@imx8mm-lpddr4-evk:~# lsmod
Module Size Used by
ec_fec 45056 0
ec_master 274432 1 ec_fec
overlay 122880 0
fsl_jr_uio 16384 0
caam_jr 176128 0
caamkeyblob_desc 16384 1 caam_jr
caamhash_desc 16384 1 caam_jr
caamalg_desc 36864 1 caam_jr
crypto_engine 20480 1 caam_jr
authenc 16384 1 caam_jr
libdes 24576 1 caam_jr
crct10dif_ce 16384 1
polyval_ce 16384 0
polyval_generic 16384 1 polyval_ce
snd_soc_imx_spdif 16384 0
snd_soc_imx_card 20480 0
snd_soc_ak4458 24576 0
snd_soc_ak5558 28672 0
caam 28672 1 caam_jr
snd_soc_fsl_spdif 24576 2
snd_soc_fsl_micfil 24576 2
snd_soc_fsl_sai 36864 4
snd_soc_fsl_utils 16384 3 snd_soc_fsl_spdif,snd_soc_fsl_micfil,snd_soc_fsl_sai
secvio 20480 0
error 24576 7 caamalg_desc,secvio,caamkeyblob_desc,caamhash_desc,caam,caam_jr,fsl_jr_uio
gpio_ir_recv 16384 0
rc_core 36864 2 gpio_ir_recv
fuse 135168 1
Where is the possible reason? How to solve it?
As described in the document “ Real-time Edge Software User Guide”
The native Ethernet driver "ec_fec" is enabled on Real-time Edge images by default for i.MX 8M Mini
LPDDR4 EVK. And it can be specified by setting "DEVICE_MODULES" variable to "fec" as below on "/etc/
ethercat.conf" file.
DEVICE_MODULES="fec"
But note that the original Ethernet fec driver must be compiled to modules by reconfiguring Linux menuconfig
when the native Ethernet driver "ec_fec" is enabled. On Real-time Edge, the original fec Ethernet driver has
been configured as a module by default.
Do you mean that the fec driver is compiled into the kernel, rather than being compiled into a module that automatically loads at startup?
At present, the fec driver should be compiled into modules.
root@imx8mm-lpddr4-evk:~# lsmod
Module Size Used by
ec_fec 45056 0
ec_master 274432 1 ec_fec
overlay 122880 0
fsl_jr_uio 16384 0
caam_jr 176128 0
caamkeyblob_desc 16384 1 caam_jr
caamhash_desc 16384 1 caam_jr
caamalg_desc 36864 1 caam_jr
crypto_engine 20480 1 caam_jr
authenc 16384 1 caam_jr
libdes 24576 1 caam_jr
crct10dif_ce 16384 1
polyval_ce 16384 0
polyval_generic 16384 1 polyval_ce
snd_soc_imx_spdif 16384 0
snd_soc_imx_card 20480 0
snd_soc_ak4458 24576 0
snd_soc_ak5558 28672 0
caam 28672 1 caam_jr
secvio 20480 0
error 24576 7 caamalg_desc,secvio,caamkeyblob_desc,caamhash_desc,caam,caam_jr,fsl_jr_uio
snd_soc_fsl_micfil 24576 2
snd_soc_fsl_spdif 24576 2
snd_soc_fsl_sai 36864 4
snd_soc_fsl_utils 16384 3 snd_soc_fsl_spdif,snd_soc_fsl_micfil,snd_soc_fsl_sai
gpio_ir_recv 16384 0
rc_core 36864 2 gpio_ir_recv
fuse 135168 1
Hello,
You are missconfigured the ethernet, make sure you have fec in your image.
Regards