EC-Master for TI AM3359 ICEv2 - PHY crash, cable dissconnected error

ti

#1

I’ve been following the Acontis EC Master Class B and TI EtherCAT Master Reference documents. I have the application running on a TI AM3359 ICEv2 board. As a slave, I am using an EasyCAT device, have verified that it is working using EC-Engineer, and have generated the MasterENI.c file as instructed.

However, when the application starts, the PHY port turns off (LEDs all extinguish), and I get a cable disconnected error. I’ve tried both ports, and patch/regular cables to no avail. (serial output below). After spending all yesterday pouring over the manuals trying to find a clue to my issue, I’m hoping someone can point me in the right direction.

Thanks for your help,

Jeff

TI Industrial SDK Version - IASDK 1.1.0.8
Device name : AM3359
Chip Revision : AM335x ES1.2 [PG2.1]

SYS/BIOS EcMaster Sample application running on ICE V2
Full command line: -auxclk 2000 -v 3 -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 c4:f3:12:72:48:64

001474 : CPSW INF: CPSW3G found. CPSW INF: HW-Id: 0x0019, RTL: 0, Major: 1, Minor: 0xc
001476 : CPSW INF: PHY found. Id=0x2000a211
001476 : CPSW INF: Restart PHY auto negotiation
007536 : CPSW INF: PHY link timeout (waiting for auto negotiation completion).
007562 : Unlicensed version, stop sending ethernet frames after 60 minutes!
007564 : Ethernet cable not connected
007573 : ecatScanBus() Error 0x9811002d in McSm state ‘SB_DONE’ for requested state ‘SB_DONE’
007573 : Cannot scan bus: ERROR: Ethernet link cable disconnected (0x9811002d)
007573 : EtherCAT network adapter MAC: C4-F3-12-72-48-64

007573 : =====================
007573 : Start EtherCAT Master
007573 : =====================
007603 : ecatSetMasterStateEx() Error 0x9811002d in McSm state ‘START’ for requested state ‘START’
007603 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
007603 : CFG/BUS VendorId: ---- (0x79a) / ---- (0x0); ProductCode: Unknown (0xdefede) / Unknown (0x0)
007603 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
007603 : CFG/BUS VendorId: ---- (0x79a) / ---- (0x0); ProductCode: Unknown (0xdefede) / Unknown (0x0)
007603 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
007603 : CFG/BUS VendorId: ---- (0x79a) / ---- (0x0); ProductCode: Unknown (0xdefede) / Unknown (0x0)
007603 : Cannot start set master state to INIT (Result = ERROR: Ethernet link cable disconnected (0x9811002d))
007603 : ========================
007603 : Shutdown EtherCAT Master
007603 : ========================
007689 : ecatSetMasterStateEx() Error 0x9811002d in McSm state ‘START’ for requested state ‘START’
007689 : Cannot stop EtherCAT-Master! ERROR: Ethernet link cable disconnected (0x9811002d)
007707 : ================================================================
007707 : PerfMsmt ‘JOB_ProcessAllRxFrames’ (avg/max) [usec]: 0.8/ 10.7
007707 : PerfMsmt 'JOB_SendAllCycFrames ’ (avg/max) [usec]: 1.2/ 47.9
007707 : PerfMsmt 'JOB_MasterTimer ’ (avg/max) [usec]: 2.5/ 95.0
007707 : PerfMsmt 'JOB_SendAcycFrames ’ (avg/max) [usec]: 0.4/ 4.9
007707 : PerfMsmt 'Cycle Time ’ (avg/max) [usec]: 977.3/2009.2
007707 : PerfMsmt 'myAppWorkPd ’ (avg/max) [usec]: 0.4/ 4.2
008004 : CPSW INF: Disable running RX-DMA
008004 : CPSW INF: RX+TX DMA disabled. Delay 500
008005 : EcMasterDemo stop.


#2

Thank you for your inquiry, I will look into this and get back as soon as I know more.

Best regards,
Nick


#4

Thanks. I have not resolved the issue, but have an update.

If I comment out lines 305 - 312 in main.c, then the “disconnected cable” error goes away, but there are tx errors.

304    MDIOPhyAutoMDIXEnable(SOC_CPSW_MDIO_REGS, 1);
305   
306    /* Chip configuration MII/RMII selection */
307    /*PortModeSelect_Ind();
308    if(AM335X_BOARD_TYPE_ICE_V2 == s_boardType)
309    {
310        RMIIClock_setup();
311     } */
312
313    InitAuxClockTimer();

The serial output is as follows:
Chip Revision : AM335x ES1.2 [PG2.1]

SYS/BIOS EcMaster Sample application running on ICE V2
Full command line: -auxclk 2000 -v 3 -t 10000 -perf -cpsw 1 1 1 m custom am33XX 1 1 0

000968 : Run demo now with cycle time 2000 usec
000968 : Using AuxClock
000968 : ==========================
000968 : Initialize EtherCAT Master
000968 : ==========================
000968 : EC-Master V2.9.0.06 (Protected) for SYSBIOS Copyright acontis technologies GmbH @ 2016
000969 : CPSW INF: Port 1, Prio 1, Flags [Polling] [Master], Phy 1, PhyInterface 32,  MAC c4:f3:12:72:48:64

000969 : CPSW INF: CPSW3G found. CPSW INF: HW-Id: 0x0019, RTL: 0, Major: 1, Minor: 0xc
000971 : CPSW INF: PHY found. Id=0x2000a211
000971 : CPSW INF: Restart PHY auto negotiation
002681 : CPSW INF: PHY auto negotiation completed
002699 : Unlicensed version, stop sending ethernet frames after 60 minutes!
002823 : Retry sending a acyclic frame due to timeout
002823 : EtherCAT command IDX set value=0xdf
002942 : Retry sending a acyclic frame due to timeout
002942 : EtherCAT command IDX set value=0xe0
003186 : Scan Bus returned with error: Bus configuration mismatch (0x9811001e)
003675 : 1 identical messages skipped
003675 : ecatScanBus() Error 0x9811001e in McSm state 'SB_DONE' for requested state 'SB_DONE'
003790 : EtherCAT network adapter MAC: C4-F3-12-72-48-64

003790 : =====================
003790 : Start EtherCAT Master
003790 : =====================
004278 : Scan Bus returned with error: Bus configuration mismatch (0x9811001e)
004286 : ecatSetMasterStateEx() Error 0x9811001e in McSm state 'START' for requested state 'START'
004286 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
004286 : CFG/BUS VendorId: Beckhoff Automation GmbH (0x2) / ---- (0x0); ProductCode: EK1100 (0x44c2c52) / Unknown (0x0)
004286 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
004286 : CFG/BUS VendorId: Beckhoff Automation GmbH (0x2) / ---- (0x0); ProductCode: EK1100 (0x44c2c52) / Unknown (0x0)
004286 : Scan bus mismatch for the first slave on the bus! BUS VendorId: ---- (0x0); ProductCode: Unknown (0x0).
004286 : CFG/BUS VendorId: Beckhoff Automation GmbH (0x2) / ---- (0x0); ProductCode: EK1100 (0x44c2c52) / Unknown (0x0)
004286 : Cannot start set master state to INIT (Result = Bus configuration mismatch (0x9811001e))
004286 : ========================
004286 : Shutdown EtherCAT Master
004286 : ========================
004771 : Scan Bus returned with error: Bus configuration mismatch (0x9811001e)
004779 : ecatSetMasterStateEx() Error 0x9811001e in McSm state 'START' for requested state 'START'
004779 : Cannot stop EtherCAT-Master! Bus configuration mismatch (0x9811001e)
004797 : ================================================================
004797 : PerfMsmt 'JOB_ProcessAllRxFrames' (avg/max) [usec]:    1.7/ 10.6
004797 : PerfMsmt 'JOB_SendAllCycFrames  ' (avg/max) [usec]:    3.9/ 11.2
004797 : PerfMsmt 'JOB_MasterTimer       ' (avg/max) [usec]:    5.8/ 75.6
004797 : PerfMsmt 'JOB_SendAcycFrames    ' (avg/max) [usec]:    1.7/ 29.4
004797 : PerfMsmt 'Cycle Time            ' (avg/max) [usec]:  1998.9/2010.2
004797 : PerfMsmt 'myAppWorkPd           ' (avg/max) [usec]:    0.8/  3.8
005094 : CPSW INF: Disable running RX-DMA
005094 : CPSW INF: RX+TX DMA disabled. Delay 500
005095 : EcMasterDemo stop.

#5

Hello,

My colleague provided the following feedback.

The demo should work out of the box on TI AM3359 ICEv2 board.I suspect the customer have jumper placed for using Port 1 with ICSS and not as CPSW. Please verify the same.

image

Best regards,
Nick


#6

That was the problem. The demo is now working flawlessly. I’m glad it was so simple. Thanks!

–Jeff


#7

I’m glad, have a nice day!

Best regards,
Nick