AnsweredAssumed Answered

Ethernet configuration on STM32F407 Discovery board

Question asked by ihatetoregister.ihat on Jan 8, 2016
Latest reply on Feb 15, 2016 by ihatetoregister.ihat
I want to get networking capabilities on my stm32F-Discovery board running STM32F407VG MCU. Hence  i bought the expansion board STM32F4DIS-BB  
and interfaced it with my existing board following the instructions mentioned in STM32F4DIS-BB manual and UM1713 Developing applications on STM32Cube with LwIP TCP/IP stack . Next i tried to use the STM32Cube firmware package and found that it has useful examples such as http server, tcp echo server,etc using the LwIP stack. Now for some reason i am unable to get the communication between my PC and the discovery board to work. :(

Strange since i am using the default projects provided by ST without adding any code. While here is exactly what i tried to do : 

I tried to use the TCP server example from stm32cubef4\STM32Cube_FW_F4_V1.10.0\Projects\STM324xG_EVAL\Applications\LwIP\LwIP_TCP_Echo_Server folder. I compiled it initially i was unable to it to work properly as i saw via the debugger that the code would hang at 

  /* Wait for software reset */
  while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET)
  {
  }

so i looked up and found the solution  on these forums . the trick was the enable the Ethernet clock after the reset so now i could see that the IP address of the board was being correctly set ( default static ip ) and that the program goes into a wait state waiting to serve request to any client that would connect to it. 

The strange problem is that I am just unable to get my PC to discover the device. I setup my PC to be in the same subnet as the discovery board. Here are my  board settings:

 
/*Static IP ADDRESS: IP_ADDR0.IP_ADDR1.IP_ADDR2.IP_ADDR3 */
#define IP_ADDR0   192
#define IP_ADDR1   168
#define IP_ADDR2   0
#define IP_ADDR3   10
   
/*NETMASK*/
#define NETMASK_ADDR0   255
#define NETMASK_ADDR1   255
#define NETMASK_ADDR2   255
#define NETMASK_ADDR3   0


/*Gateway Address*/
#define GW_ADDR0   192
#define GW_ADDR1   168
#define GW_ADDR2   0
#define GW_ADDR3   1

And my PC is set to : 
IP : 192.168.0.11
Subnet  : 255.255.255.0
Gateway : 192.168.0.1

I tried both crossover and straight Ethernet cables for connecting my board and PC. 

Also the readme.txt file inside the folder at stm32cubef4\STM32Cube_FW_F4_V1.10.0\Projects\STM324xG_EVAL\Applications\LwIP\LwIP_TCP_Echo_Server does not mention to me any additonal jumper settings that i should do ? Or do i genuinely miss something very very obvious here ?? 

The ping as well as echotool utility fail to establish connection with my board. Seems very strange that the straightforward example couldnt work ?

Any tips ?

Outcomes