Project

General

Profile

Issue with Native EtherCAT Driver Installation on AM62A with IGH Stack

Added by Rajkumar Dumala 1 day ago

Dear Support Team,

I am currently working on integrating the EtherCAT native driver on a MitySOM-AM62Ax platform using the EtherCAT IGH master stack.

During the configuration process, I encountered the following issue:

I compiled the IGH EtherCAT master with the native driver support by using the --enable-am65cpsw flag and --disable-generic to select the native driver path. Based on the ( https://gitlab.com/npitre/ethercat/-/commits/master?ref_type=HEADS ) commit by IGH. branch:master commit:(Support for ti-am65-cpsw-nuss with v6.6 kernel).

However, I faced a problem related to load the native EtherCAT driver. It was succesfully installed but when i tried to start the systemctl command it was seem some error related to driver

Shutting down EtherCAT master 1.6.1 done
Starting EtherCAT master 1.6.1 [ 72.193952] ec_master: loading out-of-tree module taints kernel.
[ 72.205165] EtherCAT: Master driver 1.6.1 1.6-alpha-176-gdb48d9b0
[ 72.211744] EtherCAT: 1 master waiting for devices.
[ 72.257645] Error: Driver 'am65-cpsw-nuss' is already registered, aborting...
modprobe: ERROR: could not insert 'ec_ti_am65_cpsw_nuss': Device or resource busy
failed
root@mitysom-am62ax:/# uname -a
Linux mitysom-am62ax 6.6.58-g7a2fa4c23070-dirty #2 SMP Thu May 1 16:07:13 IST 2025 aarch64 aarch64 aarch64 GNU/Linux

Regards,
Debashis


Replies (2)

RE: Issue with Native EtherCAT Driver Installation on AM62A with IGH Stack - Added by Rajkumar Dumala 1 day ago

Hi Experts,

Both interfaces are linked to the same bus address (8000000.ethernet), which I understand represents a single CPSW Ethernet controller.

To illustrate the architecture:
-------------------------
Linux Network Interface (eth0, eth1)
-------------------------
Ethernet Driver (e.g., am65-cpsw-nuss)
-------------------------
Ethernet Hardware Block (Controller inside SoC(8000000.ethernet))
-------------------------
Physical Ethernet PHY (External transceiver chip)
-------------------------
Ethernet Cable

Initially, I attempted to unbind the CPSW driver and restart the EtherCAT master. However, the same error persisted.

Upon further investigation, I found that both Ethernet ports (eth0 and eth1) are controlled by the same Ethernet hardware block. The ethtool output confirms this:

root@mitysom-am62ax:/# ethtool -i eth0
driver: am65-cpsw-nuss
version: 6.6.58-g7a2fa4c23070-dirty
firmware-version:
expansion-rom-version:
bus-info: 8000000.ethernet
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
root@mitysom-am62ax:/# ethtool -i eth1
driver: am65-cpsw-nuss
version: 6.6.58-g7a2fa4c23070-dirty
firmware-version:
expansion-rom-version:
bus-info: 8000000.ethernet
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes

Summary of My Understanding:
Both eth0 and eth1 are logical ports of the same CPSW Ethernet hardware block.
The native EtherCAT driver requires exclusive access to the Ethernet controller.
It appears I cannot assign one port for EtherCAT and another for regular Linux networking, as both are tied to the same controller.

Rectify me if I am wrong.

Regards,
Debashis

RE: Issue with Native EtherCAT Driver Installation on AM62A with IGH Stack - Added by Michael Williamson 1 day ago

Hi Debashis,

I think you are correct.

I only have seen TI mentioning supporting CODESYS for ethernet master operations an the AM62x family. For slave you'd likely have to run the R5F and I don't think you can share the switch with linux, but I would need to configurm that.

This link on TI's E2E has some additional information and links for getting the CODESYS IP to run. TI states that they don't officially support the IGH master stack.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1347202/am623-ethercat-and-tsn

I don't think we've looked at running ethercat master on the SOMs here yet. I will check with the team and advise if this is not the case.

With regards,
Mike

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)