Skip to main content
Associate II
November 25, 2024
Solved

unable to setup a simple server in stm32f407 with Lan8720

  • November 25, 2024
  • 2 replies
  • 2691 views

I am trying a simple example code for running the server in stm32f407, I have used LAN 8720. The connection are as follows:
PA1 -----nINT/RETCLK
PA2-----MDIO
PA7-----CRS
PB11----TX_EN
PB12---TX0
PB13---TX1
PC1----MDC
PC4----RX0
PC5----RX1

 

my settings in the cube ide are:

RCC--> HSE:crystal/ceramic Resonator
SYS---> Debug: trace asynchronous SW
CONNECTIVITY----> ETH: RMII
MIDDLEWARE---> LWIP setting:

Discount_50_0-1732519438718.png

My  clock configuration settings:

Discount_50_1-1732519499068.png

 

my main.c is attached below.

 

I am not able to figure out the problem. I am pinging the IP and it is not responding, the page is showing error "server not responding"

 

Best answer by Discount_50

It worked with STM32cubeide version 1.8.0 where in lwipopts.h there is a parameter named HTTPD_USE_CUSTOM_FSDATA from 1 to 0. 
But this is not there in version 1.15.1

2 replies

Technical Moderator
November 25, 2024

Hello @Discount_50 ,

Try the LwIP example within STM32CubeF4 package and you may update the it according to your needs:

STM32CubeF4/Projects/STM32F429ZI-Nucleo/Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS at master · STMicroelectronics/STM32CubeF4 · GitHub

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Associate II
November 25, 2024

I am trying to run this simple program, without using RTOS, when i enter the ip it should respond me with "Hello World"

Discount_50AuthorBest answer
Associate II
April 3, 2025

It worked with STM32cubeide version 1.8.0 where in lwipopts.h there is a parameter named HTTPD_USE_CUSTOM_FSDATA from 1 to 0. 
But this is not there in version 1.15.1