AnsweredAssumed Answered

STM32F779 Ethernet LwIP DHCP not working

Question asked by Io D on Feb 23, 2017
Latest reply on Mar 15, 2017 by Imen D

I am currently working with STM32F779 and i'm trying to obtain an IP address using the LwIP Middleware unsuccessfully.


Here are the configurations:


1. Change some jumpers according to the user manual page 23.


STM32F779 - Change jumpers


2.  Using the STM32CubeMX, i've made the following configurations



3. In the header file lwip.h i have extern the following variables (used in lwip.c file)  because they will also be used at freertos.c file :


extern struct netif gnetif;
extern ip4_addr_t ipaddr;
extern ip4_addr_t netmask;
extern ip4_addr_t gw;


4. In the source file freertos.c, inside the defaultThread, i have the following:




while (gnetif.ip_addr.addr == 0)



   if (mscnt >= DHCP_COARSE_TIMER_SECS * 1000)
      mscnt = 0;
   BSP_LCD_DisplayStringAtLine(20,"DHCP Negotiating");



Unfotunately, the gnetif.ip_addr.addr is not changing as it should be after obtaining an IP address.


Is there something that i am missing?  

Please help me to find the right solution.


Kind regards,