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.

DM642网络问题



您好!

我在用DM642与PC做网络通信,DM642程序中有下面一段,问题就出这。

// This is a callback from the Ethernet driver. This function
// is called whenever there is a change in link state. The
// current PHY and current link state are passed as parameters.
//
void DM642EMAC_linkStatus( uint phy, uint linkStatus )
{
    SCOM_Handle hs_Netok;

    hs_Netok = SCOM_open("NETOK");

 LOG_printf(&trace, "hello world!putmsg");

    printf("Link Status: %s\n",LinkStr[linkStatus]);
   
    if (linkStatus>0)
    {
     linkstatus = 1;
 }
    else
    {
     linkstatus = 0;
 }    
 SCOM_putMsg(hs_Netok,NULL);
    // Since we know we're using the Intel PHY, we'll
    // go ahead and program the LEDs to make sense.
    MDIO_phyRegWrite( phy, 0x14, 0xd5d0 );
}

这个函数一直不能得到调用,导致SCOM_putMsg(hs_Netok,NULL);一直不执行

后面因为有  SCOM_getMsg( hs_Netok, SYS_FOREVER ); 所以程序一直停在这,请问可能是什么问题,会出现这种问题?我是通过路由器将DM642和PC连在一起,网线是好的,路由是好的。