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.

C6474 CSL EMAC Example Project

Hi.

I am using the EVMC64674 Dev Board with CCS3.3. I am urgently looking for help with the C6474 CSL EMAC example project.

The project is supposed to be able to do an external loopback (I assume through the external RJ-45 loopback device included with the board), by simply changing the following part of the code:

#define LOCAL_LOOPBACK  0       /* Loopback internal to the EMAC */
#define PHY_LOOPBACK       1       /* Loopback at the PHY device    */

However, with or without external loopback device connected, doing this results in the following stdout messages:

EMAC example
Calling EMAC_open()
Calling EMAC_setReceiveFilter()
Waiting for link...
Packets Held : 8-RX  0-TX

Starting packet transfer...
ERROR: Timeout waiting for TX/RX
Sent 8 of 1055 packets, received 0 packets
Calling EMAC_close()
0

Example Failed

Make sure to use a loopback connector if not
using local loopback (#define LOCAL_LOOPBACK 1)

I have also tried to change " ecfg.UseMdio = 1" in order for the module to detect a Link, but with no success. I get the following stdout message:

EMAC example
Calling EMAC_open()
Calling EMAC_setReceiveFilter()
Waiting for link...
Link Status  : No Link on PHY number 16
Packets Held : 8-RX  0-TX

WARNING: No device LINK.

Starting packet transfer...

It then simply hangs here, seemingly in an infinite loop. I have also tried connecting it to a live 1000M ethernet port (from a PC), with the same result.

So, either there is something wrong with my loopback device (Called the "SuperLooper" by Smartronix), or there is something wrong with the example.

Can anyone help?

Estian.

  • (Sorry it took me so long to answer. I missed the message somehow...)

     

    I had had the exact same problems with the C6474 and the Ethernet example.

    What I did to solve it was the following:

    1. I downloaded a .c version of csl_emac and csl_mdio.

    2. In csl_mdio, there is a function that runs over all possible PHYs (I think it's 0-31, but I'm not sure). The actual PHY on my EVBoard was PHY1. I changed the loop so it will look only for this PHY.

    3. I added some delay between updating the MDIO status (in csl_mdio) and looking for the link. I think the function name is mdio_init_continue.

    4. I found a function called init_phy in some other example (I don't remember which, it was over 6 months ago, and only a temporary board for me before I switched to the 6472).

    This seemed to work, and then it found a link.

     

    I hope this helps. I'm afraid I no longer have the code, as this is not the EVBoard I eventually used...