This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

init_tcpnet needes a very long time

I use the LPC1758 with the Keil MDK-Toolchain (Version 4.60). During Startup I initialize all
components of my hardware (Own design).

Everything is fine if I connet the board to a PC (Ethernet). In this case init_tcpnet()
needes 2 sec. If there is no cable (Ethernet is not connected) init_tcpnet() needes 35 sec!!!

//This Part of the Firmware is resposible:

void init_ethernet (void) {
...
#else /* Use autonegotiation about the link speed. */ write_PHY (PHY_REG_BMCR, PHY_AUTO_NEG); /* Wait to complete Auto_Negotiation. */ for (tout = 0; tout < 0x100000; tout++) { regv = read_PHY (PHY_REG_BMSR); if (regv & 0x0020) { /* Autonegotiation Complete. */ break; } }
#endif
...

Where is the Problem - or better - what is the right choice to improve this behaviour(Decrease tout)?

Many thanks.

Parents Reply Children
No data