lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] CRC error when dhcp_start() used


From: TJO
Subject: [lwip-users] CRC error when dhcp_start() used
Date: Wed, 17 Feb 2016 02:14:15 -0700 (MST)

Hi all

We have used the lwip 1.4.x for some years now, with static IP.
It worked an still works great.

I try to enable DHCP but I got some problems.

When I have called dhcp_start(), all received ethernet frames are rejected
by lpc_low_level_input with a CRC error. (lpc_enetif->prxs[idx].statusinfo
== EMAC_RINFO_CRC_ERR)
See below on how I star the DHCP.

I'm running lwip in FreeRTOS on a LPC1788

Any ideas?


This is what I do: (Basically the same as always, but with a call to
dhcp_start)
#define LWIP_DHCP                       1
#define LWIP_UDP                        1
// Add zero static IP
IP4_ADDR(gw, 0, 0, 0, 0);
IP4_ADDR(ipaddr, 0, 0, 0, 0);
IP4_ADDR(netmask, 0, 0, 0, 0);
// Setup interface
memset(&lpc_netif, 0, sizeof(lpc_netif));
netif_add(&lpc_netif, &ipaddr, &netmask, &gw, NULL, lpc_enetif_init,
tcpip_input);
// Enable MAC interrupts
NVIC_SetPriority(ENET_IRQn, configEMAC_INTERRUPT_PRIORITY/*((0x01 << 3) |
0x01)*/);
NVIC_EnableIRQ(ENET_IRQn);
// Use DHCP??
if(sBoxConfig.byUseDHCP)
{
    // start dhcp
   dhcp_start(&lpc_netif);
   // Just for testing...
   while(lpc_netif.dhcp->state != DHCP_BOUND)
   {
     // Wait a bit
     vTaskDelay(50);
   }
}




--
View this message in context: 
http://lwip.100.n7.nabble.com/CRC-error-when-dhcp-start-used-tp25760.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]