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.

AM335x ICE EtherCAT Master

Other Parts Discussed in Thread: TMDSICE3359, SYSBIOS

Hi,

I am using TMDSICE3359 as etherCAT master and EVB3-LAN9252 as etherCAT slave.

I have followed the exact steps in : http://www.ti.com/lit/ug/tiduaf8a/tiduaf8a.pdf

Full command line: -auxclk 2000 -v 2 -t 10000 -perf -cpsw 1 1 1 m custom am33XX 1 1 0

001473 : Run demo now with cycle time 2000 usec
001473 : Using AuxClock
001473 : ==========================
001473 : Initialize EtherCAT Master
001473 : ==========================
001473 : EC-Master V2.9.0.06 (Protected) for SYSBIOS Copyright acontis technologies GmbH @ 2016
001474 : CPSW INF: Port 1, Prio 1, Flags [Polling] [Master], Phy 1, PhyInterface 32,  MAC 84:eb:18:ad:f7:5f

001475 : CPSW INF: CPSW3G found. CPSW INF: HW-Id: 0x0019, RTL: 0, Major: 1, Minor: 0xc
001475 : CPSW ERR: mdio ACK missing
001475 : CPSW INF: mdio reg 2 read error
001475 : CPSW ERR: PHY initialization failed
001547 : Unlicensed version, stop sending ethernet frames after 60 minutes!
001548 : Ethernet cable not connected
001557 : ecatScanBus() Error 0x9811002d in McSm state 'SB_DONE' for requested state 'SB_DONE'
001557 : Cannot scan bus: ERROR: Ethernet link cable disconnected (0x9811002d)
001557 : EtherCAT network adapter MAC: 84-EB-18-AD-F7-5F

001557 : =====================
001557 : Start EtherCAT Master
001557 : =====================
001587 : ecatSetMasterStateEx() Error 0x9811002d in McSm state 'START' for requested state 'START'
001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
001587 : Cannot start set master state to INIT (Result = ERROR: Ethernet link cable disconnected (0x9811002d))
001587 : ========================
001587 : Shutdown EtherCAT Master
001587 : ========================
001673 : ecatSetMasterStateEx() Error 0x9811002d in McSm state 'START' for requested state 'START'
001673 : Cannot stop EtherCAT-Master! ERROR: Ethernet link cable disconnected (0x9811002d)
001691 : ================================================================
001691 : PerfMsmt 'JOB_ProcessAllRxFrames' (avg/max) [usec]:    0.9/ 11.3
001691 : PerfMsmt 'JOB_SendAllCycFrames  ' (avg/max) [usec]:    1.2/ 46.7
001691 : PerfMsmt 'JOB_MasterTimer       ' (avg/max) [usec]:    2.4/ 95.5
001691 : PerfMsmt 'JOB_SendAcycFrames    ' (avg/max) [usec]:    0.4/  5.2
001691 : PerfMsmt 'Cycle Time            ' (avg/max) [usec]:  1144.9/2006.8
001691 : PerfMsmt 'myAppWorkPd           ' (avg/max) [usec]:    0.5/  5.0
001988 : CPSW INF: Disable running RX-DMA
001988 : CPSW INF: RX+TX DMA disabled. Delay 500
001989 : EcMasterDemo stop.

Please help.

  • Hi,

    I get the following console output:

    Full command line: -auxclk 2000 -v 2 -t 10000 -perf -cpsw 1 1 1 m custom am33XX 1 1 0

    001473 : Run demo now with cycle time 2000 usec
    001473 : Using AuxClock
    001473 : ==========================
    001473 : Initialize EtherCAT Master
    001473 : ==========================
    001473 : EC-Master V2.9.0.06 (Protected) for SYSBIOS Copyright acontis technologies GmbH @ 2016
    001474 : CPSW INF: Port 1, Prio 1, Flags [Polling] [Master], Phy 1, PhyInterface 32,  MAC 84:eb:18:ad:f7:5f

    001475 : CPSW INF: CPSW3G found. CPSW INF: HW-Id: 0x0019, RTL: 0, Major: 1, Minor: 0xc
    001475 : CPSW ERR: mdio ACK missing
    001475 : CPSW INF: mdio reg 2 read error
    001475 : CPSW ERR: PHY initialization failed
    001547 : Unlicensed version, stop sending ethernet frames after 60 minutes!
    001548 : Ethernet cable not connected
    001557 : ecatScanBus() Error 0x9811002d in McSm state 'SB_DONE' for requested state 'SB_DONE'
    001557 : Cannot scan bus: ERROR: Ethernet link cable disconnected (0x9811002d)
    001557 : EtherCAT network adapter MAC: 84-EB-18-AD-F7-5F

    001557 : =====================
    001557 : Start EtherCAT Master
    001557 : =====================
    001587 : ecatSetMasterStateEx() Error 0x9811002d in McSm state 'START' for requested state 'START'
    001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
    001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
    001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
    001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
    001587 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
    001587 : CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)
    001587 : Cannot start set master state to INIT (Result = ERROR: Ethernet link cable disconnected (0x9811002d))
    001587 : ========================
    001587 : Shutdown EtherCAT Master
    001587 : ========================
    001673 : ecatSetMasterStateEx() Error 0x9811002d in McSm state 'START' for requested state 'START'
    001673 : Cannot stop EtherCAT-Master! ERROR: Ethernet link cable disconnected (0x9811002d)
    001691 : ================================================================
    001691 : PerfMsmt 'JOB_ProcessAllRxFrames' (avg/max) [usec]:    0.9/ 11.3
    001691 : PerfMsmt 'JOB_SendAllCycFrames  ' (avg/max) [usec]:    1.2/ 46.7
    001691 : PerfMsmt 'JOB_MasterTimer       ' (avg/max) [usec]:    2.4/ 95.5
    001691 : PerfMsmt 'JOB_SendAcycFrames    ' (avg/max) [usec]:    0.4/  5.2
    001691 : PerfMsmt 'Cycle Time            ' (avg/max) [usec]:  1144.9/2006.8
    001691 : PerfMsmt 'myAppWorkPd           ' (avg/max) [usec]:    0.5/  5.0
    001988 : CPSW INF: Disable running RX-DMA
    001988 : CPSW INF: RX+TX DMA disabled. Delay 500
    001989 : EcMasterDemo stop.

    My set up:

    TMDSICE3359: etherCAT master

    EVB3: LAN9252: EtherCAT slave

    I have connected Ethernet port 0 of 3359 to port 0 of 9252.

    J5: 1 and 2 are shorted and in J18 and J19, 1 and 2 are shorted.

    followed steps 6 and 7 of http://www.ti.com/lit/ug/tiduaf8a/tiduaf8a.pdf.

  • The EtherCAT team have been notified. They will respond here.
  • Hi It seems there is a bus mistmatch, please follow "Appendix B" to create a new ENI file with match your network (new slave)
    Thank you,
    Paula
  • Hi Paula, thanks for the reply. I did follow Appendix B and created a new ENI file using EC engineer and then converted that to .c file using bin2header and then appended the size as the last line in the MasterENI.c file. Pasted this .c file in the EC-master/Workspace/SYSBIOS directory. The ENI file that I generated using EC-engineer is correct - this is because, I can see the correct manufacturer(uchip) and I can see the product code to be 0xd and vendor id to be 0xe00004d8. These numbers are the same in the EC-engineer and the console output that I posted in the first post of this thread.
    In your opinion, what could be wrong when it says "scan bus mismatch for first slave" error? please help.
    My connection: 3359ICE Port 0 to LAN9252 port 0 using crossover RJ45 Ethernet cable. jumpers J1, J18 and J19 are 1 and 2 pins shorted. what is that that I am missing?
  • Tharangini, I haven't used crossover cable for connecting EtherCAT master and slave before, so no sure if this is OK or if it could be a problem.. Also, maybe was a typo but you mentioned J1 instead of J5

    TMDSICE3359 (AM335x ICE V2 board)
    – Select the CPSW using jumpers J18 and J19 between pin 1 and 2
    – Select pin 1 and 2 shorted on J5 for booting

    thank you,
    Paula
  • HiPaula, That was real quick. Thanks for that.
    Yes you are correct: I meant J5 and not J1. I tried using cross over and straight RJ45 Ethernet cables. From the console output that I pasted in the first post of this thread, I see the problem might be because of one/both of the following:
    1. "CPSW ERR: mdio ACK missing" : Does this mean that the cable connecting master and slave is wrong, or does it also mean that there is no slave present, or, the slave is present, but it is not responding to the master in the format as expected by the master.
    2. "CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)" : I think CFG means configuration value got by the master from the MasterENI.c file and BUS means the value read by the master hardware from the slave hardware. From this console output, it is clear that the configuration read from MasterENI.c by the master is correct. But, this does not match with what is read by the hardware (BUS): meaning 0xe00004d8 Vs 0 : don't match.
    Could this be because, the slave is not responding to the master, in a format that is expected by the master?
    Thanks again.
  • Also, no orange and green leds are glowing while the EC master program is running in the 3359 ICE board.
    Connection for the above scenario:
    3359 ICE board to LAN9252 slave via straight Ethernet cable.
    Green and orange leds of 3359 ICE master are glowing just after power up(and when no EC master program is running in the 3359 master).
    Connection for the above scenario:
    3359 ICE board to LAN9252 slave via straight Ethernet cable.
  • HiPaula, That was real quick. Thanks for that.
    Yes you are correct: I meant J5 and not J1. I tried using cross over and straight RJ45 Ethernet cables. From the console output that I pasted in the first post of this thread, I see the problem might be because of one/both of the following:
    1. "CPSW ERR: mdio ACK missing" : Does this mean that the cable connecting master and slave is wrong, or does it also mean that there is no slave present, or, the slave is present, but it is not responding to the master in the format as expected by the master.
    2. "CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)" : I think CFG means configuration value got by the master from the MasterENI.c file and BUS means the value read by the master hardware from the slave hardware. From this console output, it is clear that the configuration read from MasterENI.c by the master is correct. But, this does not match with what is read by the hardware (BUS): meaning 0xe00004d8 Vs 0 : don't match.
    Could this be because, the slave is not responding to the master, in a format that is expected by the master?
    Thanks again.
  • From the console output that I pasted in the first post of this thread, I see the problem might be because of one/both of the following:
    1. "CPSW ERR: mdio ACK missing" : Does this mean that the cable connecting master and slave is wrong, or does it also mean that there is no slave present, or, the slave is present, but it is not responding to the master in the format as expected by the master.
  • 2. "CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)" : I think CFG means configuration value got by the master from the MasterENI.c file and BUS means the value read by the master hardware from the slave hardware. From this console output, it is clear that the configuration read from MasterENI.c by the master is correct. But, this does not match with what is read by the hardware (BUS): meaning 0xe00004d8 Vs 0 : don't match.
  • 2. "CFG/BUS VendorId: ---- (0xe00004d8) / ---- (0x0); ProductCode: Unknown (0xd) / Unknown (0x0)" :
    Think CFG means configuration value got by the master from the MasterENI.c file and BUS means the value read by the master hardware from the slave hardware. From this console output, it is clear that the configuration read from MasterENI.c by the master is correct. But, this does not match with what is read by the hardware (BUS): meaning 0xe00004d8 Vs 0 : don't match.
  • Tharangini,
    Printed error "cannot scan bus: ERROR: Ethernet link cable disconnected (0x9811002d)" means the master don't see the slave. Have you tried this slave with another master, for example Twincat?. Also by any chance do you have another TI AM335x or AM437x boards that you can use as slaves? If so, I could give you a tested ENI file for AM335x or AM437x for a sanity check in your setup.

    Finally, did you rebuild the project with your new ENI file? (I believe you did, just to confirm)

    thank you,
    Paula
  • Hi Paula, thanks for the reply.I have used the same slave with the same cable with another master(TWINCAT system manager)to flash the ESI file (which I have used for 335x master ENI file) into its flash memory. So, the same slave can talk to TWINCAT master but not to 335xICE master. Unfortunately, I dont have neither TI AM335x nor AM437x to use as slaves. Also I have rebuilt the project(checked time stamp of .out file) with my new ENI file. Also, in the CFG part of the uart output of 335x ICE master, I can see that it has read the correct ENI file(because the vendor ID and product code of the slave is seen in the CFG part of uart output of 335x ICE master)
  • Tharangini, just to confirm you are connecting to Eth cable to J2 (Eth0 port) right?.. If so, maybe there is something wrong with the ENI file, maybe good to send this question also to acontis support (ecsupport@acontis.com) for their comments.
    thank you,
    Paula
  • Hi Paula,thanks for the quick reply. Yes I have connected Eth cable to J2(Ethernet_0 port), in 3359ICE master.I will send this question to Acontis support. Thanks for the reply, again. Much appreciated.
  • I also have the same problems, but here are steps I resolved this problems.

    1. Re-build kernel without CPSW kernel module (EC_master classB, page 25).

    processors.wiki.ti.com/.../Linux_Kernel_Users_Guide
    processors.wiki.ti.com/.../Linux_Core_CPSW_User's_Guide

    2. Notice paremeters

    ./arm-ethercat -f eni.xml -b 50000 -t 20000 -perf -cpsw 1 1 1 m custom am33XX 0 1 0

    with
    "-cpsw " \
    "1 " /* port */ \
    "1 " /* mode: polling */ \
    "1 " /* priority */ \
    "m " /* master flag */ \
    "custom am33XX " /* custom board for AM33xx*/ \
    "0" /* PHY address */ \
    "1 " /* PHY connection mode: RGMII *, 0: GMII / \: J5: wire pin1 and pin2
    "0 " /* Not use DMA buffers */
  • Hi Tuan, thanks for your reply, and your point is correct when using EC-Master + TI Processor SDK Linux. However, just to clarify, I think this E2E post was for EC-Master running on RTOS.

    thank you,
    Paula