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.

MCU-PLUS-SDK-AM243X: MCU-PLUS-SDK-AM243X: Using DP83826 for EtherCat Phy -- Part2

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG, DP83869

Tool/software:

Come from the post : https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1514305/mcu-plus-sdk-am243x-using-dp83826-for-ethercat-phy

Hi Aaron,

   Following your guidance in the above post, I did the test.

1 The link polarity is taken care when Enhanced Link is enabled. You can also disable Enhanced Link and see if you're able to scan for the device (which will point out whether the issue is with Enhanced Link configuration)

         --I have test two kinds of Ethernet cable in case of the link polarity, I also disable Enhanced link in Sysconfig to test, and failed to scan my board.
2 tiesc_addOnBoardResetSequence() logic is implemented - which you already have taken care of.

         --confirm this
3 tiesc_ethphyInit() logic has been modified to use DP83826 PHY and corresponding mods, instead of DP83869 PHY.

         --do nothing here
4 There is a strapping issue in our ICSSG0 add-on board for which a software workaround is implemented in tiesc_ethphyEnablePowerDown() API. You can remove this if this issue is not applicable in your case.

        --I haven't met strapping issue by now, keep this tiesc_ethphyEnablePowerDown() here could cause something wrong?  

Couple of things to check here is:
Are you able to access the PHY registers through MDIO?

       -- Yes I can. I wrote CR1 and CR2 reg of the PHY and  can read state_reg of the PHY.
Are you getting a link change status in the MDIO link register, that is, 0x30010E40 (base addresses for MDIO emulated space) if you're using MDIO firmware workaround (MDIO_MANUAL_MODE_ENABLED) or 0x3003240C if you're not using MDIO emulation?

      --do you are meaning access 0x30010E40/0x3003240C in CCS by Memeory Browser? I read them in Memeory Browser, and both are 0. MDIO_MANUAL_MODE_ENABLED is checked in my Sysconfig.


Is the firmware receiving EtherCAT frames? This can be confirmed by monitoring 0x30010E00 to 0x30010E03 Vendor Specific ESC Registers:

     -- the link is not established, there is no EtherCAT frame.

 

BR,

CHunyang

  • Hi, 

    I have printed some registers from the PHY for analysis of the failure of linkup 

    0x10: PHYSTS : x1006 or x5006
    0x1: BMSR: x7849
    0xf: FLDS: x0000
    0x4: ANAR: x0161
    0x5: ALNPAR: x0000

    BR,

    Chunyang 

  • Update my progress...

    After write the following registers for the values shows blow: 

    0x4: ANAR,0x01E1
    0x0: BMCR,0x3300
    0xB: CR3, 0x0008
    0xA: CR1, 0xA0
    0x9: CR1, 0x0020
    0x16: BISCR, 0x0108

    I read out from the PHY, the registers as following:
    0x10: PHYSTS : x1104
    0x1: BMSR: x7849
    0xf: FLDS: x0000
    0x4: ANAR: x01E1
    0x5: ALNPAR: x41E1
    0x6: ANER: x0007
    0x0: BMCR: x3100

    From bit5 of BMSR: Auto Negotiation process not completed

    Is this my problem, Auto Negotiation process not completed?

    BR,

    Chunyang 

  • Hi Chunyang,

    --I haven't met strapping issue by now, keep this tiesc_ethphyEnablePowerDown() here could cause something wrong?  
    • I'm referring to the following code snippet. You can remove this if not applicable in your case. 
    -- Yes I can. I wrote CR1 and CR2 reg of the PHY and  can read state_reg of the PHY.
    • Okay so the PHY communication seems to be established.
    -do you are meaning access 0x30010E40/0x3003240C in CCS by Memeory Browser? I read them in Memeory Browser, and both are 0. MDIO_MANUAL_MODE_ENABLED is checked in my Sysconfig.
    • Are you observing bits set in MDIO Alive Register? I'm referring to 0x30010E40+0x08 offset. The bit number in this register is to be configured as MDIO PHY Address in the application sysconfig ETHPHY module:
    • Also you should be able to see corresponding bit toggling in MDIO Link register (offset 0x30010E40 + 0x0C) Register when Ethernet cables are connected/disconnected to the RJ45 connector. You can try this activity by disabling the Enhanced Link within the application.
       -- the link is not established, there is no EtherCAT frame.
    • Okay... Got it.
    Is this my problem, Auto Negotiation process not completed?
    • Yes this can be the problem for not being able to establish EtherCAT link.

    Regards,
    Aaron

  • Hi Aaron,

      My Issue is fixed, after making sure my registers from the PHY as the following, all the matter as solved.

    BR,

    Chunyang 

    --------------------------reg list------------------------------

    addr: x0000, phy state reg : x3100

    addr: x0001, phy state reg : x786D

    addr: x0002, phy state reg : x2000

    addr: x0003, phy state reg : xA131

    addr: x0004, phy state reg : x01C1

    addr: x0005, phy state reg : xCDE1

    addr: x0006, phy state reg : x000F

    addr: x0007, phy state reg : x2001

    addr: x0008, phy state reg : x0000

    addr: x0009, phy state reg : x0020

    addr: x000A, phy state reg : x0102

    addr: x000B, phy state reg : x0000

    addr: x000C, phy state reg : x0000

    addr: x000D, phy state reg : x0000

    addr: x000E, phy state reg : x0000

    addr: x000F, phy state reg : x0000

    addr: x0010, phy state reg : x0015

    addr: x0011, phy state reg : x0108

    addr: x0012, phy state reg : x6400

    addr: x0013, phy state reg : x2800

    addr: x0014, phy state reg : x0000

    addr: x0015, phy state reg : x0000

    addr: x0016, phy state reg : x0100

    addr: x0017, phy state reg : x0049

    addr: x0018, phy state reg : x0480

    addr: x0019, phy state reg : xCC00

    addr: x001A, phy state reg : x0000

    addr: x001B, phy state reg : x007D

    addr: x001C, phy state reg : x05EE

    addr: x001E, phy state reg : x0102