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.

PROCESSOR-SDK-AM437X: EtherCAT large TxPdo issue

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: PROCESSOR-SDK-AM335X, AM3359, AM4379, TMDSICE3359

The issue mentioned in the e2e link below is also happening on an ICE v2 (AM3359).  Does the fix released in PRU-ICSS EtherCAT 1.0.4 applies to PROCESSOR-SDK-AM335X?

https://e2e.ti.com/support/arm/sitara_arm/f/791/p/588374/2219703#2219703

Thanks,

Ignacio

  • The RTOS team have been notified. They will respond here.
  • Hi Ignacio,PRU-ICSS EtherCAT slave 1.0.4 didn't include fix for Large PDO for AM335x (due to memory restrictions). However, latest PRU-ICSS EtherCAT slave 1.0.6 includes this fix as shown in Release notes

    EtherCAT slave release notes

    Fixed Issues

    PINDSW-2565 AM335x EtherCAT Slave shows wrong working counter for second datagram in case of large TxPdo access

    Thank you,

    Paula

  • Hello Paula,

    We are testing the fix to the described issue on an ICEv2 board using PRU-ICSS 1.0.6 and still does not work.

    Our issue is not as described in the suggested solution thread.

    In our case a PDO is split between two frames instead of been a large PDO that spans along two frames.

    The PDO is about 350 Bytes so Bytes 0--160 are in frame 0 while Bytes 161--349 are in frame 1.

    The new Acontis configuration tool generates an ENI that splits the slave's PDO the way described above.

    Thanks,

    Ignacio

  • Hi Ignacio, what is the issue you are facing when you tested a PDO split in frames? could you please send us some wireshark logs? and/or any other log you consider useful for showing the issue?

    Slave: are you testing as-is our PRU-ICSS EtherCAT slave 1.0.6? or it is any modification I would need to do in order to reproduce the issue in my side? If so, please send me all the changes.

    Master: which acontis configuration tool version are you using? or better, could you please send my your ENI file for an ICEv2? This would help us to reproduce the issue as well..

    thank you,
    Paula
  • Ignacio, I want to confirm the platform you are using. Am3359 or AM4379?

    Thank you,

    Paula

  • We are using AM3359. An ICE v2 evaluation board TMDSICE3359
    Thanks,
  • the issue is not resolved. Still having issues
  • Using recommended PRU-ICCS 1.0.6 does not resolve the issue
  • Hi Ignacio, thanks for sending your modified TI_ESC.xml and Acontis xml for generating MasterENI.c file.

    A question, did you also modified PRU-ICSS EtherCAT slave to reflect the changes done done in RX and TX PDO? If so, could you please send me your new files (tiescappl.c and tiescappl.h)?.

    Just to double check, for PRU-ICSS EtherCAT slave 1.0.6 did you use Ethercat Slave Stack SCC_5.1.2?

    Also please let me know how do you test it. Did you get wireshark logs? If so, can you share them? I guess you used an scope for SYNC0?

    thanks for you help,

    Paula

  • Ignacio, thanks for sharing your modified "tiescappl.h" and "tiescappl.c" files.

    I modified "tiesc_eeprom.h" using your "TI_ESC.xml". Just FYI, I created EEPROM binary and header file following this instructions:

    Generation ESI header file from ESI xml

    From the master side I used your "ecatConfig_ti_longerTimeout.xml" to generate acontis ENI file (MasterENI.c) and rebuild.

    However, I see acontis master reports Bus configuration mismatch (0x9811001e)

    Could you please send me your "tiesc_eeprom.h", to compare it with mine?. I will also send you mine, in a private message, just for your reference.

    010228 : ========================

    010228 : Shutdown EtherCAT Master

    010228 : ========================

    010246 : Bus scan successful - 1 slaves found

    010246 : Scan Bus returned with error: Bus configuration mismatch (0x9811001e)

    010248 : ecatSetMasterState() Error 0x9811001e in McSm state 'SB_DONE' for requested state 'MASTER_INIT_DONE'

    010248 : Cannot stop EtherCAT-Master: Bus configuration mismatch (0x9811001e))

    010249 : ============================================================================

    010249 : PerfMsmt 'JOB_ProcessAllRxFrames' (min/avg/max) [usec]:    0.3/   5.4/  31.2

    010249 : PerfMsmt 'JOB_SendAllCycFrames  ' (min/avg/max) [usec]:    0.2/   3.3/  27.1

    010249 : PerfMsmt 'JOB_MasterTimer       ' (min/avg/max) [usec]:    0.2/  13.6/ 341.5

    010249 : PerfMsmt 'JOB_SendAcycFrames    ' (min/avg/max) [usec]:    0.2/   4.0/  28.7

    010249 : PerfMsmt 'Cycle Time            ' (min/avg/max) [usec]:  119.0/ 998.7/1010.2

    010249 : PerfMsmt 'myAppWorkPd           ' (min/avg/max) [usec]:    0.3/   0.6/   1.8

    010568 : EcMasterDemo stop.

    A question, your modified PRU-ICSS EtherCAT slave application is suppose to work with TwinCAT?, I am getting below error, but I am not sure if it should work or not..

    Just for your information, for Twincat test I copied your "TI_ESC.xml". Inside C:\TwinCAT\3.1\Config\Io\EtherCAT and Twincat scan seems correct, I see the new data variables that you defined.

    thank you,

    Paula

  • Ignacio, also, is there any configuration/settings that I need to take care in the master? or the slave? are you using DC mode? which cycle time are you using?

    thank you,
    Paula
  • Ignacio, I was able to get acontis EC-Master to work with your ethercat_slave_full_AM335x_arm.out. The trick was to use your TI_ESC.xml in order to get acontis ENI file using EC-Engineer.

    No sure why if I use your .xmls (ecatConfig_ti.xml and ecatConfig_ti_longerTimeout.xml) for generating acontis ENI files I am getting "bus mismatch"

    Also, if I use my created ethercat_slave_full_AM335x_arm.out, I am getting below error:

    009380 : =====================
    009380 : Start EtherCAT Master
    009380 : =====================
    009385 : Master state changed from <UNKNOWN> to <INIT>
    009416 : Master state changed from <INIT> to <PREOP>
    009425 : ERROR: At least one slave in error status
    009425 : Slave error "Slave_1001 [TIESC-001]": - EtherCAT address=1001 - State <PREOP ERROR>(0x12), control status <Invalid Output Configuration>(0x1d)
    009425 : EC_NOTIFY_SLAVE_INITCMD_RESPONSE_ERROR: PS 'Slave_1001 [TIESC-001]' (1001): check device state for SAFEOP canceled. ERROR: Slave error (0x98110024)
    009425 : Slave init command response error - Slave Slave_1001 [TIESC-001]: - EtherCAT address=1001 - Current State change of slave="PREOP to SAFEOP" target state could not be reached
    009429 : ecatSetMasterState() Error 0x98110024 in McSm state 'WAIT_MASTER_SAFEOP' for requested state 'MASTER_SAFEOP_DONE'
    009429 : Cannot start set master state to SAFEOP: ERROR: Slave error (0x98110024))
    009429 : ========================
    009429 : Shutdown EtherCAT Master

    But in any case, at least with your *.out I can get the master to correctly communicate with the slave. Questions/Comments below:

    1) Now, how can I reproduce the issue?. Do I need to connect an sniffer to wiresharks?. What exactly is the issue? is ti an error reported in EC-Master?

    2) could you share with me your EtherCAT slave project, with all the files. I wan to compare what do we have different.

    thank you,

    Paula
  • Ignacio, a quick update. I connected a Beckhoff ET2000 in order to get wiresharks. I actually don't see the PDO splitted in two frames, and working counters looks good to me (LRW cnt =3). I am using EC-Master v3.0 and I believe you are using v2.9, Maybe is v3.0 doesn't split PDO? Could you ask acontis?

    In any case, please see below EC-Master console log and also attached wireshark for your reference.

    000013 : Full command line: -auxclk 1000 -v 2 -t 1000000000 -perf -icss 1 1 m am3359-icev2

    000013 : Run demo now with cycle time 1000 usec

    000013 : Using AuxClock

    000013 : OsMeasGet100kHzFrequency(): 600 MHz

    000013 : ==========================

    000013 : Initialize EtherCAT Master

    000013 : ==========================

    009320 : EtherCAT network adapter MAC: 00-00-00-00-00-00

    009380 : Bus scan successful - 1 slaves found

    009381 : ******************************************************************************

    009381 : Slave ID............: 0x00000000

    009381 : Bus Index...........: 0

    009381 : Bus AutoInc Address.: 0x0000

    009381 : Bus Station Address.: 0x03e9 (1001)

    009381 : Bus Alias Address...: 0x0001 (   1)

    009381 : Vendor ID...........: 0x0000059D = ----

    009381 : Product Code........: 0x54490001 = Unknown

    009381 : Revision............: 0x00000011   Serial Number: 0

    009381 : ESC Type............: Texas Instruments (0x90)  Revision: 1  Build: 1261

    009381 : Connection at Port A: yes (to 0x00010000)

    009381 : Connection at Port D: no (to 0xFFFFFFFF)

    009381 : Connection at Port B: no (to 0xFFFFFFFF)

    009381 : Connection at Port C: no (to 0xFFFFFFFF)

    009381 : Line Crossed........: no

    009381 : Cfg Station Address.: 0x03e9 (1001)

    009381 : PD IN    Byte.Bit offset: 0.0   Size: 56 bits

    009381 : PD OUT   Byte.Bit offset: 0.0   Size: 552 bits

    009381 : =====================

    009381 : Start EtherCAT Master

    009381 : =====================

    009386 : Master state changed from <UNKNOWN> to <INIT>

    009417 : Master state changed from <INIT> to <PREOP>

    009429 : Master state changed from <PREOP> to <SAFEOP>

    009437 : Master state changed from <SAFEOP> to <OP>

    009438 :

    009438 : Job times during startup <INIT> to <OP>:

    009438 : ============================================================================

    009438 : PerfMsmt 'JOB_ProcessAllRxFrames' (min/avg/max) [usec]:    0.3/  13.4/  44.6

    009438 : PerfMsmt 'JOB_SendAllCycFrames  ' (min/avg/max) [usec]:    0.3/   6.5/  20.0

    009438 : PerfMsmt 'JOB_MasterTimer       ' (min/avg/max) [usec]:    0.3/  17.9/  69.3

    009438 : PerfMsmt 'JOB_SendAcycFrames    ' (min/avg/max) [usec]:    0.2/   6.4/  26.8

    009438 : PerfMsmt 'Cycle Time            ' (min/avg/max) [usec]:  121.0/ 651.2/1006.9

    009438 : PerfMsmt 'myAppWorkPd           ' (min/avg/max) [usec]:    0.4/   1.2/   1.9

    009438 :

    011438 : ============================================================================

    011438 : PerfMsmt 'JOB_ProcessAllRxFrames' (min/avg/max) [usec]:   11.3/  12.3/  23.0

    011438 : PerfMsmt 'JOB_SendAllCycFrames  ' (min/avg/max) [usec]:    9.4/  10.2/  21.6

    011438 : PerfMsmt 'JOB_MasterTimer       ' (min/avg/max) [usec]:    6.3/   7.3/  14.2

    011438 : PerfMsmt 'JOB_SendAcycFrames    ' (min/avg/max) [usec]:    1.0/   1.3/   8.2

    011438 : PerfMsmt 'Cycle Time            ' (min/avg/max) [usec]:  988.7/ 999.4/1010.5

    011438 : PerfMsmt 'myAppWorkPd           ' (min/avg/max) [usec]:    0.5/   0.7/   6.8

     EC_Master_EtherCATslave1.0.6_LAM.pcap.zip

    Thank you,

    Paula

     

  • Hi Ignacio, no sure if you got this already resolved. Let us know if we can close this thread.
    thank you,
    Paula