cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F439ZI + Eth + LwIP; no ping response

florian.morsch
Associate II

Hello,

i have a Nucleo-144 board, where i replaced the STM32F429ZI for a STM32F439ZI.

I used CubeMX 5.2.0 to create a ethernet test project just to ping the board and go further from there, but i cant get it to work.

Ethernet is enabled

0690X000008B5dmQAC.png

Ethernet interrupt is enabled.

The parameter settings:

0690X000008B5euQAC.pngAnd the advanced parameter settings:

0690X000008B5f4QAC.png

The clock configuration:

0690X000008B5fOQAS.png

LwIP is enabled, general settings (Ive tested with bot static and dynamic IP, both wont work):

0690X000008B5fiQAC.png

I left most of the LwIP options at standart, except i set

LWIP_BROADCAST_PING (Respond to Broadcast Pings) Enabled

LWIP_MULTICAST_PING (Respond to Multicast Pings) Enabled

Also CHECKSUM_BY_HARDWARE is enabled, as well as all the CHEKSUM_GEN_*** and CHECKSUM_CHECK_***

Ive build the source code with Minimum Heap Size 0x2000 and Minimum Stack Size 0x4000.

In Atollic TrueSTUDIO 9.0.1 ive build the project, where i needed to copy fsdata.c to Middlewares/Third_Party/LwIP/src/apps/httpd/ and exclude it from build, so the file would build properly.

I added MX_LWIP_Process(); to the while(1) in main.c, compiled and flashed the board.

At this point i should be able to ping it already, but i get no response whatsoever.

It doesnt matter if i use a crossed or straight ethernet cable, connect it to the network or directly to the PC and if i give a static or dynamic IP, i cant ping the board at all.

Im in a dead end with this, i suspect that the F439ZI MCU on a F429ZI nucleo board wont work, but at this point i dont know what could be wrong. Any tipps/help would be appreciated.

11 REPLIES 11
MVENN.1
Associate II

Hi,

I'm facing the problem to connect the Ethernet to STM32F439ZT nucleo board.

but i'm not able to connect it.i given all configuration

like

/* USER CODE END Header */

/* Includes ------------------------------------------------------------------*/

#include "main.h"

#include "lwip.h"

/* Private includes ----------------------------------------------------------*/

/* USER CODE BEGIN Includes */

#include "lwip/apps/httpd.h"

/* USER CODE END Includes */

/* Private typedef -----------------------------------------------------------*/

/* USER CODE BEGIN PTD */

/* USER CODE END PTD */

/* Private define ------------------------------------------------------------*/

/* USER CODE BEGIN PD */

/* USER CODE END PD */

/* Private macro -------------------------------------------------------------*/

/* USER CODE BEGIN PM */

/* USER CODE END PM */

/* Private variables ---------------------------------------------------------*/

UART_HandleTypeDef huart3;

PCD_HandleTypeDef hpcd_USB_OTG_FS;

/* USER CODE BEGIN PV */

/* USER CODE END PV */

/* Private function prototypes -----------------------------------------------*/

void SystemClock_Config(void);

static void MX_GPIO_Init(void);

static void MX_USART3_UART_Init(void);

static void MX_USB_OTG_FS_PCD_Init(void);

/* USER CODE BEGIN PFP */

/* USER CODE END PFP */

/* Private user code ---------------------------------------------------------*/

/* USER CODE BEGIN 0 */

/* USER CODE END 0 */

/**

 * @brief The application entry point.

 * @retval int

 */

int main(void)

{

 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */

 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */

 SystemClock_Config();

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_USART3_UART_Init();

 MX_USB_OTG_FS_PCD_Init();

 MX_LWIP_Init();

 /* USER CODE BEGIN 2 */

 // initializing the HTTPd

 httpd_init();

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

 MX_LWIP_Process();

 }

 /* USER CODE END 3 */

}

/**

 * @brief System Clock Configuration

 * @retval None

 */

can you please suggest any one.

thank you.

Hello

The iformation you provide is not enough to understand the problem

With this configuration, eth. cable must be connected to board before program start

In case you use DHCP, try a delayed start of httpd_init(), not to conflict with DHCP transactions

//##############################################################################

void TimeoutHTTPDHandler(void*arg)

{

  httpd_init();//init

//   http_set_ssi_handler(SSI_Handler, TAGS, num_tags);//set callbacks for SSI array

// http_set_cgi_handlers(CGI_TAB, 1);//set callbacks for CGI array

}

//##############################################################################

in main.c file

sys_timeout(4000, TimeoutHTTPDHandler, NULL);// for delayed start of HTTPD server