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.

ETHERNET-SW: Not able to get the ethernet link in slave mode

Part Number: ETHERNET-SW

Hi Team,

 My Ethernet phy is dp83tg720, it is boot strapped to master mode.
 I want to overwrite in software to slave mode. So I write 0x1834 register to 0x8001 for changing it to slave mode. I read back and I see it getting reflected, but I am not able to get the link.
 Trying this on TI-PROCESSOR SDK VERSION: 08_01_00_13
1. Should I put in standby ?
2. Should the autonomous bootstrap also changed ?

STEPS FOLLOWED:

1. I write 0x1834 register value to 0x8001 to configure phy in slave mode .
2. For the hard reset ,I write 0x573x register to 0x101 & 0x834 register to 0xc001.
3. For soft reset,I write 0x573x register to 0x001 & 0x056A register to 0x5f41U and checked out,but I couldn't get the link.

I am using CPSW9G SGMII port and DP83TG720 phy ethernet.

Please check and suggest the steps ,which need to be followed or missed out.

Your suggestion will be helpful to proceed further.

Thanks & Regards,

Kaviya M

  • Hi Kaviya,

    Thank you for getting in touch with us.

    For hard reset, please use 0x001F = 0x8000 and for soft reset, please use 0x001F = 0x4000.
    The device should be in autonomous mode during power-up or register 0x018B[6] should be set to 1 for the device to be in normal mode and link-up.
    The register writes you were using for Master/Slave are correct.

    Can you please try with the settings now?

    Can you let me know what is the link partner used with DP83TG720?

    --
    Regards,
    Gokul.

  • Hi Gokul,

    Thanks for the quick reply

    Sorry for the confusion. I am strapping with LED_0 to be either in Master mode or in Slave mode, and accordingly changing the mode to Slave Mode(if bootstrapped as Master) and to Master Mode(if bootstrapped as Slave) in the software

    1. Yes I am setting 0x8000 for hard reset to register 0x1f and 0x4000 for soft reset

    2. I follow the sequence for slave mode configuration in software as mentioned here under "Slave Mode Configuration" in this link : https://www.ti.com/lit/ds/symlink/tda4vm.pdf?ts=1650284935110&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTDA4VM and same link I try the "Master Mode Configuration"

    With this sequence also we see the issue. If we read back the 0x834, it gets reflected as expected mode. But if strapped as Master, and I change in software as Slave, after the change link goes away(indicated by the LEDs) and vice versa observation when strapped as Slave and change in the code as Master.

    3. The hardware is strapped in auto mode LED_1

    4. The link partner is Rad Moon2 Ethernet Adaptor. The SGMII MAC side is TI TDA4 SoC

    5. Do we need to take care of anything on the SGMII MAC side for the Master/Slave mode ?

  • Hi Kaviya,

    I'm a bit confused here. Can you please clarify the following?

    Through straps, is the device in Master/Slave mode? When the device is in that strapped mode, is it observed to be linking-up with Rad Moon?

    After software write, I understand that the device is not able to link-up. Have you made sure that Rad Moon is in the opposite mode w.r.t Master/Slave?

    --
    Regards,
    Gokul.

  • Hi Gokul,

    Background:

    We are trying both by strapping Master mode and over-riding in the software as Slave mode and strapping as Slave mode and trying to override in the software as master mode. We have our custom board and currently it is strapped for Master mode. But requirement is Slave mode at this time, but may change in the future(That's why we are trying both the combination). So instead of changing in all the boards, we want to replace it in the Software. If one of the modes overriding works, we will fix that as hardware strap and software override combination(in case we need different combination in the future)

    "

    Through straps, is the device in Master/Slave mode? When the device is in that strapped mode, is it observed to be linking-up with Rad Moon?

    " -> Yes if strapped in the hardware to a particular mode and if Rad Moon2 configured the other mode link is up and working. Both combination works.

    "

    After software write, I understand that the device is not able to link-up. Have you made sure that Rad Moon is in the opposite mode w.r.t Master/Slave?

    "

    Experiments and observations:

    1. Radmoon2 is set as Master, if the board is strapped as Slave, then link comes. If Radmoon2 is slave, strapped as slave(both slave so link is not expected), but overriding as master in software link does not come

    2. Radmoon2 is set as Slave, if the board is strapped as Master, then link comes. If Radmoon2 is Master, strapped as Master(both master so link is not expected), but overriding as slave in software line does not come.

    3. This is just for experiment, though not the correct step. Radmoon2 is set as Master, the board is strapped as slave mode, link is up until software runs. Now in the software the step tried is to reconfigure again as slave, then the link goes away at the moment software runs.

    Yes, we change the Master or Slave respectively in the Rad Moon2, when we try Slave or Master in the strap(and/or in the overriding in the Software)

    Please let me know if you need more clarification

  • Hi Kaviya,

    Thank you for the very detailed explanation.

    I think we should first make sure that the register programming is correct. Can you please let me know the following?

    1. The full set of register sequence written for master/slave configuration (including hard reset/soft reset registers)
    2. What is the value of MMD1 reg<0x0834> before doing any configuration change?
    3. Which tool is used to program the registers? Do you use a software driver or a gui tool?

    --
    Regards,
    Gokul.

  • Hi Gokul,

     Thank you for your quick response!

     "The full set of register sequence written for master/slave configuration (including hard reset/soft reset registers)"

        Please find the attached excel sheet for the register and it's value configured for Master/Slave mode.

    "What is the value of MMD1 reg<0x0834> before doing any configuration change?"

      Before overwriting by any configuration change,the value of MMD1 reg<0x0834> register is 0x8001 if strapped as slave and 0xC001 when strapped as master in the hardware

    "Which tool is used to program the registers? Do you use a software driver or a gui tool?

      we are using software driver Ethernet phy driver, as a part of PDK of Processor SDK RTOS for J721E from TIconfigurations.xlsx

    configurations.xlsx

  • Hi Kaviya,

    I see that some of the register writes are missing (primarily MMD1 reg834, initial write of 0x573 to 0x0101). Can you please program the exact same registers in the exact same order for master and slave in the same order as described in https://www.ti.com/lit/an/snla371a/snla371a.pdf ?

    --
    Regards,
    Gokul.

  • Hi Gokul,

       Thanks for your reply.  Please find the attached excel sheet of the configuration ,we followed.  4532.configurations.xlsx

    Regards,

    Kaviya M

  • Hi Kaviya,

    With these updated settings, is the issue resolved?

    If not, can you please update the settings very simple for master and slave? Please remove all the other settings.

    Master:
    MMD, ADDR, DATA
    1F, 001F, 8000
    01, 0834, C001
    1F, 001F, 4000

    Slave:
    MMD, ADDR, DATA
    1F, 001F, 8000
    01, 0834, C001
    1F, 001F, 4000

    My understanding is that you were able to link-up without any initialization settings and when you write initialization settings (contains Master/Slave setting too), the link is down.
    The idea of this experiment is to see if the problem is with the initialization settings or Master/Slave configuration.

    Please let me know if you need any clarification.

    --
    Regards,
    Gokul.

  • Hi Gokul,

      "With these updated settings, is the issue resolved?"

      With that shared configuration ,our  issue is not resolved.

       Also,tried out your settings for slave ,as their is a typo error in your slave configuration for address

    0x834 the data is 8001.

      with C001 data,Radmoon2 is set as Master, the board is strapped as slave mode, link is up until software runs and then the link goes away.

     Please check and suggest the steps to follow.

    Thanks & Regards,

    Kaviya M

  • Hi Kaviya,

    When the software executes, can you please make sure that nothing extra except these three registers are written?

    Do you have TI-MSP430 available with you? It makes things easy when you decouple the processor/MAC and just write register through the MSP430?

    --
    Regards,
    Gokul.

  • Hi Kaviya,

    Can you please let me know if the issue is resolved now?

    --
    Regards,
    Gokul.

  • Hi Gokul,

           Thanks for your support!

           I have checked by configuring only for three registers ,I can get the link and it worked.

    Regards,

    Kaviya M

  • Thank you Kaviya. Can you please mark the query resolved?

    Please feel free to contact us on E2E for any queries in the future.