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.

TMS320C6678: 【TMDXEVM667LE】GE例程

Part Number: TMS320C6678

您好我想问一下GE例程支持DSP-PC间数据传输,可是在程序中并没有看到IP地址,只看到了MAC地址,dsp0的MAC地址就是888888000001吗?传输协议是UDP还是?

  • GE例程不包含以太网协议栈,就是说没有TCP/IP或者UDP协议的支持,它上面传输的是MAC层的包。如果要使用传输协议的话,可以使用NDK。

  • 那么DSP端的MAC地址怎么理解?应该是一个唯一的数值吧,怎么查看?888888000001?

  • DSP的MAC地址可以自己配置,绑定不同的MAC地址的,不一定就要用唯一的那个MACID。

    在GE_Test.c里配置。

    /*use long long type (8 bytes) for MAC address, but only lower 6 bytes are valid.
    Please note the byte order, MAC address byte 5 is in the lowest bits.
    Each MAC address corresponding to a Ethernet port*/
    unsigned long long Source_MAC_address[GE_NUM_ETHERNET_PORT]=
    {
    0x888888000001,
    0x888888000002
    };
    unsigned long long Dest_MAC_address[GE_NUM_ETHERNET_PORT]=
    {
    0x888888000101,
    0x888888000102
    };

  • 在DSP-PC通信的测试中 将mode改为ETHERNET_AUTO_NEGOTIAT_SLAVE后 debug出下面信息 

    PHY1 link up. TSCL= 0x4ca7a366
    PHY1 link down. TSCL= 0x4caf2502
    PHY1 link down. TSCL= 0x4e425de3
    PHY1 link down. TSCL= 0x4e821a7b
    PHY1 link down. TSCL= 0x4e987966
    PHY1 link down. TSCL= 0x5064268c
    PHY1 link down. TSCL= 0x50a19068
    PHY1 link down. TSCL= 0x537e53a6
    PHY1 link down. TSCL= 0x538e735a
    PHY1 link down. TSCL= 0x53925894
    PHY1 link up. TSCL= 0x53bc054b
    PHY1 link up. TSCL= 0x53ded48e
    PHY1 link down. TSCL= 0x5560771b
    PHY1 link down. TSCL= 0x58d3a5d9
    PHY1 link down. TSCL= 0x5907a4c1
    PHY1 link up. TSCL= 0x591ff68d

    if(gpMDIO_regs->LINK_REG&(1<<uiPhy_NUM))
    printf("PHY%d link up. TSCL= 0x%x\n", uiPhy_NUM, TSCL);
    else
    printf("PHY%d link down. TSCL= 0x%x\n", uiPhy_NUM, TSCL);

    LINK_REG:

    MDIO Link state. This register is updated after a read of the Generic Status Register of a PHY. The bit is set if the PHY with the
    corresponding address has link and the PHY acknowledges the read transaction. The bit is reset if the PHY indicates it does not have
    link or fails to acknowledge the read transaction. Writes to the register have no effect.
    In addition, the status of the two PHYs specified in the MDIOUSERPHYSEL registers can be determined using the MLINK input pins.
    This is determined by the LINKSEL bit in the MDIOUSERPHYSEL register.
    0 = The PHY indicates that it does not have a link or fails to acknowledge the read transaction
    1 = The PHY with the corresponding address has a link and the PHY acknowledges the read transaction

    请问出现这种link up/down跳变的情况是由于硬件上网口没连好或者连接不稳定吗还是其他原因?

  • 新问题麻烦另起新帖,方便其他客户参考,谢谢!