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.

LAUNCHXL2-RM57L: EMAC and MDIO settings

Part Number: LAUNCHXL2-RM57L
Other Parts Discussed in Thread: HALCOGEN, DP83640

Hi,

I am trying to establish communication between 2Nos XL2RM57 launchpads and I am facing issues in establishing the link. I have selected MII mode through HALCOGEN to generate the code.

Launchpad1 is configured to always Transmit and Launchpad2 is configured to always Receive the Data packets.

I have certain questions regarding the initialization procedure to be followed:

1) Should I set different MAC addresses for source(Launchpad1) and destination(Launchpad2) ? ( Currently I have set the same MACaddress for both launchpad1 and launchpad2).

2) The MACAddr register( MACAddrLo, MACAddrHi and MACIndex) doesn't update during debug mode. Please refer the screenshots attached below and suggest what might be the problem? 

3) The LINK register(MDIO) status is 0x0000 and doesn't establish link with the receiver. 

4) I have configured MII for 100Mbps speed and the current status indicates it to be 10Mbps. How to change this configuration?

5) Does MII_Tx_Clk and MII_RxClk have any effect on speed of MII (10/100 Mbps) ? (For both 2.5MHz and 25Mhz I am getting same speed of 10Mbps)

6) I am not able to read MDIO registers(PHY status) of launchpad1 and launchpad2. Kindly suggest further.

I have attached the code and HALCOGEN files for your reference.EMACx.zip

  • Hello Joel,

    Please refer to the active webserver example code first. The example code contains the PHY configuration.

  • Hello,

    1) Should I set different MAC addresses for source(Launchpad1) and destination(Launchpad2) ? ( Currently I have set the same MACaddress for both launchpad1 and launchpad2).

    QJW> yes, two boards should use different MAC address. 

    2) The MACAddr register( MACAddrLo, MACAddrHi and MACIndex) doesn't update during debug mode. Please refer the screenshots attached below and suggest what might be the problem? 

    QJW> Please use this API to assign mac address to EMAC registers:

             void EMACMACAddrSet(uint32 emacBase, uint32 channel, uint8 macAddr[6], uint32 matchFilt)

    3) The LINK register(MDIO) status is 0x0000 and doesn't establish link with the receiver. 

    QJW> Please use MDIOPhyLinkStatusGet(mdioBaseAddr) to read PHY Link status register. The mdioBaseAddr is Base Address of the MDIO Module.Registers.

    4) I have configured MII for 100Mbps speed and the current status indicates it to be 10Mbps. How to change this configuration?

    QJW> Did you use this function to program PHY AutoNEGotiation register? Dp83640AutoNegotiate(mdioBaseAddr, phyAddr, DP83640_100BTX | DP83640_100BTX_FD).

    5) Does MII_Tx_Clk and MII_RxClk have any effect on speed of MII (10/100 Mbps) ? (For both 2.5MHz and 25Mhz I am getting same speed of 10Mbps)

    QJW> The transmit and receive clock operates at either 2.5 MHz to support 10 Mb/s operation modes or at 25 MHz to support 100 Mb/s operational modes.

    6) I am not able to read MDIO registers(PHY status) of launchpad1 and launchpad2. Kindly suggest further.

    QJW> Please use the the function generated by HALCoGen:  MDIOPhyLinkStatusGet()

  • Hi QJ,

    I am trying to execute the loopback program from HALCOGEN examples and have connected the RJ45 connector in this format : Tx+ to Rx+ and Tx- to Rx-.

    The program enters infinite loop while executing MDIOPhyRegRead function and link is not established. I have attached my settings and code for your reference. Kindly suggest further.

    Regards,
    Joel emacloopback.zip

  • Hi Joel,

    Have you solved the issue of reading the ethernet PHY registers?