Pumpkin, Inc.

Pumpkin User Forums

ethernet

For issues specific to the 8051 family, including compilers (e.g. Keil C51) and IDEs (e.g. uVision2).

ethernet

Postby babud » Fri Jul 11, 2008 2:42 am

Hello every one,
I am working on Silabs Ethernet DK(F120TB+AB4). I have enabled TCP,HTTP and code generated. After the set up,when I run the code i’m not able to get the web page “HELLO WORLD”. And system status LED (green) not glow.when I ping the embedded system message comes “request timed out” .I tried to resolve the problem by placing BREAK points and noticed the function mn_ether_init(AUTO_NEG, 0, 0) is blocking(not returned), if returned, I checked the return value ,it giving error code “-116”(ether_send_error).
I am giving the code where I STUCK.
//-----------------------------------------------------------------------------
// establish_network_connection
//-----------------------------------------------------------------------------
//
// This function calls mn_ether_init() to initialize the CP2200 and attach to
// the network.
//
// If there is a network connection, the function returns 1.
//
// In the call to mn_ether_init(), NUM_AUTONEG_ATTEMPTS is set to 0, so the
// function will not return until it successfully auto-negotiates.
//
// mn_ether_init() will not be a blocking call if NUM_AUTONEG_ATTEMPTS is set
// to a value greater than 0.
//
int establish_network_connection()
{
int retval;

do
{
// mn_ether_init() initializes the Ethernet controller.
// AUTO_NEG indicates that the controller will auto-negotiate.
retval = mn_ether_init(AUTO_NEG, 0, 0);

// If there is no link, poll link_status until it sets or the
// CP2200 resets and then call mn_ether_init() again.
if (retval == LINK_FAIL)
{
while(!link_status && !ether_reset);
}

// If retval is less than zero and is not LINK_FAIL, there is a
// hardware error.
else if (retval < 0)
{
// Verify that the Ethernet controller is connected and powered properly.
// Verity that the EMIF has been configured at a speed compatible with the
// Ethernet controller.
while(1);
I STUCKED HERE. AND CONTROL STAYS IN THIS LOOP.
}

}while(retval < 0);

return (1);

}

I’m simply receiving and transmitting packets and not enabled any other peripherals
( UART’s,SMBUS,SPI).
I’m not able to resolve this problem. Pls someone help me..
Thankq u all.
Babu

[This message has been edited by babud (edited July 11, 2008).]

babud
 
Posts: 2
Joined: Thu Jul 10, 2008 11:00 pm

Re: ethernet

Postby babud » Fri Jul 11, 2008 11:12 am

Hello every one,
I am working on Silabs Ethernet DK(F120TB+AB4). I have enabled TCP,HTTP and code generated. After the set up,when I run the code i’m not able to get the web page “HELLO WORLD”. And system status LED (green) not glow.when I ping the embedded system message comes “request timed out” .I tried to resolve the problem by placing BREAK points and noticed the function mn_ether_init(AUTO_NEG, 0, 0) is blocking(not returned), if returned, I checked the return value ,it giving “-116”(ether_send_error).
I am giving the code where I STUCK.
//-----------------------------------------------------------------------------
// establish_network_connection
//-----------------------------------------------------------------------------
//
// This function calls mn_ether_init() to initialize the CP2200 and attach to
// the network.
//
// If there is a network connection, the function returns 1.
//
// In the call to mn_ether_init(), NUM_AUTONEG_ATTEMPTS is set to 0, so the
// function will not return until it successfully auto-negotiates.
//
// mn_ether_init() will not be a blocking call if NUM_AUTONEG_ATTEMPTS is set
// to a value greater than 0.
//
int establish_network_connection()
{
int retval;

do
{
// mn_ether_init() initializes the Ethernet controller.
// AUTO_NEG indicates that the controller will auto-negotiate.
retval = mn_ether_init(AUTO_NEG, 0, 0);

// If there is no link, poll link_status until it sets or the
// CP2200 resets and then call mn_ether_init() again.
if (retval == LINK_FAIL)
{
while(!link_status && !ether_reset);
}

// If retval is less than zero and is not LINK_FAIL, there is a
// hardware error.
else if (retval < 0)
{
// Verify that the Ethernet controller is connected and powered properly.
// Verity that the EMIF has been configured at a speed compatible with the
// Ethernet controller.
while(1);
I STUCKED HERE. AND CONTROL STAYS IN THIS LOOP.
}

}while(retval < 0);

return (1);

}

I’m simply receiving and transmitting packets and not enabled any other peripherals
( UART’s,SMBUS,SPI).
I’m not able to resolve this problem. Pls someone help me..
Thankq u all.
Babu


[This message has been edited by babud (edited July 11, 2008).]

[This message has been edited by babud (edited July 11, 2008).]

babud
 
Posts: 2
Joined: Thu Jul 10, 2008 11:00 pm


Return to 8051 family

Who is online

Users browsing this forum: No registered users and 1 guest

cron