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.

AM2434: AM2434 EtherCAT Slave (Full TI Stack): Proper Deinit/Reinit on ICSSG PRU

Part Number: AM2434

Hi,


i am developing an EtherCAT slave application using the Full TI Stack on the Sitara AM2434 with AM243x INDUSTRIAL COMMUNICATIONS SDK 11.00.00.

I am currently running the EtherCAT slave stack on the ICSSG PRU (as provided in the Industrial Communications SDK examples). The initialization of the stack and firmware loading works as expected and the slave operates correctly in the EtherCAT network.

However, I am facing an issue regarding the controlled shutdown and restart of the EtherCAT slave:

Use Case

I need to:

  1. Properly stop/deactivate the running EtherCAT slave
  2. Deinitialize all related resources (PRU, drivers, stack, memory, etc.)
  3. Subsequently reinitialize and restart the EtherCAT stack again within the same application runtime

-> The goal is to enable runtime restart capability without rebooting the system

Problem Description

  • The initial startup works fine
  • However, after attempting to:
    • stop the EtherCAT stack
    • deinitialize ICSSG/PRU and stack components a clean reinitialization is not reliably possible
  • It seems that not all resources are fully reset, or some internal state persists (possibly in the PRU firmware, shared memory, or driver layer)

Questions

  1. Is there an official or recommended sequence for:

    • stopping the EtherCAT slave stack
    • unloading or resetting the PRU firmware
    • deinitializing ICSSG/driver components
    • and performing a clean restart?
  2. Are there any specific APIs in the Industrial Communications SDK for:

    • EtherCAT stack deinitialization
    • PRU/ICSSG reset (beyond basic driver close calls)?
  3. Does a proper restart require:

    • a full ICSSG subsystem reset, or
    • even a device reset, or should this be achievable purely in software?
  4. Are there known limitations in the current SDK (11.00.00) regarding multiple init/deinit cycles for EtherCAT?

Any guidance, recommended sequence, or reference example would be highly appreciated.

Best Regards
Andreas

  • Hello Andreas,

    Currently, we have no documented steps for stopping and restarting the EtherCAT SubDevice stack. Could you please let us know the application context that requires a controlled shutdown and runtime stack restart capabilities?

    Kind Regards,

  • Hello,

    thank you for the response.

    The application context is the following:

    I want to run the EtherCAT SubDevice stack on the ICSSG PRU as provided by the Industrial Communications SDK. However, depending on the system configuration or operating mode, the same ICSSG instance should alternatively be used for standard Ethernet / TCP/IP communication without any fieldbus.

    For this reason, it is required to:

    • fully stop and shut down the EtherCAT stack running on the ICSSG PRU
    • deinitialize all EtherCAT‑related software components, including PRU firmware, shared memory, and ICSSG drivers
    • subsequently reinitialize the ICSSG PRU so that it can be used for a different firmware and communication mode (standard TCP/IP)

    This switch should be done purely in software at runtime, without a full device reset or reboot.

    Therefore, a controlled shutdown and clean reinitialization of the ICSSG PRU is essential in order to safely transition between:

    • EtherCAT operation (Full TI Stack on PRU), and
    • non‑fieldbus Ethernet operation on the same ICSSG instance.

    Any guidance on whether this use case is supported, recommended reset/deinit sequences, or architectural limitations of the current SDK would be very helpful.

    Kind Regards
    Andreas

  • Hi Andreas,

    Thanks for the application context. Could you please let us know if EoE (Ethernet over EtherCAT) can be used for standard TCP/IP communication in your application? Please refer to Ethernet Over EtherCAT (EoE) page in the EtherCAT SubDevice documentation. Also, refer to a sample Webserver Demo example in Industrial Communications SDK.

    Kind Regards,

  • Hi,

    thank you for the suggestion.

    EoE (Ethernet over EtherCAT) is already being used in our application when EtherCAT is active, and it works well for providing TCP/IP communication via the EtherCAT master.

    However, my requirement is slightly different:

    I would like to implement an additional operating mode where no EtherCAT master is present, and the device runs purely on standard Ethernet / TCP/IP communication using the same ICSSG instance.

    This means:

    • EtherCAT (including EoE) is completely disabled
    • The ICSSG PRU is used with a different firmware / configuration for standard Ethernet operation
    • The system should be able to switch between these two modes at runtime, ideally without a reboot

    So the key requirement is the ability to:

    • fully shut down the EtherCAT stack and release all ICSSG/PRU resources
    • and then reinitialize the ICSSG for non‑fieldbus Ethernet use

    Could you please advise if such a runtime transition is supported, or if there are known limitations in the current SDK regarding reuse of ICSSG between EtherCAT and standard Ethernet modes?

    Kind Regards
    Andreas

  • Hi Andreas,

    The complete shutdown of EtherCAT stack and release of ICSSG/PRU resources is not supported.

    It is possible to perform a software reset of the AM243x device from the EtherCAT SubDevice application and load non-EtherCAT application which initializes the PRU for standard TCP/IP communications by using a customized SBL, which decides the type of application (EtherCAT SubDevice or non-EtherCAT) to load based on some conditions, for example a specific value in EEPROM. 

    Kind Regards,