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.

TLK110 switch between RMII and MII

Other Parts Discussed in Thread: TLK110, CDCE913, AM3359

Hi,

I refer to the following thread: http://e2e.ti.com/support/interface/ethernet/f/903/t/310855.aspx

There it is written that the TLK110 needs to be strapped to RMII mode and that the clock needs to be 50MHz to be able to switch it to MII mode with register RCSR.

1. Question:
Does the clock has to stay at 50MHz after the switch to MII mode or should it be switched to 25MHz?

2. Question:
We have a board that clocks the PHY with 25MHz during power-up (CDCE913 with 25MHz crystal). The TLK110 is strapped to RMII mode. What we can do is switching the clock from 25MHz to 50MHz after power-up and then switch the TLK110 to MII mode (using register RCSR). Is this possible?

3. Question:
What is the reason to have the clock 50MHz while switching the TLK110 from RMII to MII mode?

4. Question:
What about the transition from MII back to RMII? What is the right way to do that?

It would be very helpful if someone from TI could further clarify the switching procedure and maybe give some background information (e.g. about the clock).

Thanks and best regards,
Patrick

  • Hi Patrick,

    regarding the questions:

    1. yes, the clock needs to stay at 50Mhz after switching to MII mode
    2. could you please elaborate what it is that you are trying to do?
    3. if you need the flexibilty to work in both MII and RMII modes than you should supply the 50Mhz and strap the PHY to RMII. if you only need MII you require the 25Mhz and no strap. this is how the architecture of the PHY operates
    4. transition from MII back to RMII (assuming you have the 50Mhz and strap to RMII)reg 0x17 change bit 5 value to 1  and restart core: WR reg 0x1f bit 14 = 1

    Thanks,

    Aviad

  • Hi Aviad,

    Thanks for the reply.

    Yes, we need the flexibility to work with both MII and RMII. We use the TLK110 together with the AM335x on a custom board. The TLK110 is used for EtherCAT (PRU MII interface) as well as for Ethernet (RMII interface).

    Let's say the clock is 25MHz during power-up of the TLK110. The TLK110 is strapped to RMII. Is it possible to switch the Clock to 50MHz and then do a restart of the core (0x1f bit 14=1)? Or is it important for the TLK110 to have the 50MHz clock present while power-up and strapped to RMII?

    I now understand that I have to leave the clock at 50MHz if I want to use the PHY in MII mode after strapped to RMII. What happens with CLKOUT (pin25) in this case (25MHz, 50MHz or off) ?

    Thanks,
    Patrick
     

  • Hi Patrick,

    There are couple of options to work with both MII and RMII.

    The recommended mode is:

    1)      The PHY must start at RMII

    1. Supply 50Mhz ref clock
    2. Configure the RMII strap to RMII enabled
    3. Wake up

    2)      In order to move to MII:

    1. Keep REF clock 50MHz (no need to change strap option)
    2. Configure MII mode in: reg 0x17 change bit 5=1
    3. Restart the core: reg 0x1f bit 14 = 1

    3)      In order to move back to RMII:

    1. Keep REF clock 50MHz (no need to change strap option)
    2. Configure MII mode in: reg 0x17 change bit 5=1
    3. Restart the core: eg 0x1f bit 14 = 1

     

    The reason for keeping the REF clock is to avoid glitches from the REF clock input while switching between different clock sources.

     

    There is also an option to switch between the modes with clocks switching (between 25Mhz to 50Mhz),

    But this require also control on the HW_RESET and the RMII strap (RX_DV pin) from host controller,

    The procedure should be:

    1)      Start with MII mode

    2)      When moving to RMII mode:

    1. Change REF_CLK
    2. Change strap option
    3. APPLY HW_RESET (re-latch strap of RMII and also RESET design after REF clock switching)

     

    Thanks,

    Oren

  • Hi,

    I am also having same situtaion where i need to switch between two modes. But my question is,

    Does AM3359 generate 50MHz in any pin so that i can use that clock source? Now TLK110 is connected with 25MHz crystal for MII mode and we do not have 50MHz cystal as of now.

    Regards,

    Ibram

  • Ibram,

    The AM3359 is not able to source a 50MHz clock suitable for RMII.  For the 50MHz clock reference, you should use a 50MHz oscillator and provide the clock to both the AM3359 and the TLK110.

    Patrick

  • Thanks for your response.

  • For EtherCAT, with AM3359 and the ICE v1 board, what is the default mode? Is it MII or RMII?
    Which shall the ICE v1 board use in order to work better?
  • Hi Clark,

    This thread has been closed. Please re-submit your question on a new thread.

    Thank you,
    Ross