Ethernet - LWIP

Setting up Ethernet PHY Layer

Under "Connectivity" tab, select ETH.

Set ETH mode to RMII, and make sure the pin mapping corresponds to the one on the Nucleo board

On the F429ZI Nucleo board, the pin mapping should look as follows.

Setting up Middleware LWIP Protocol Layer

Under "Middleware and Software Packs" tab, select LWIP (Lightweight IP).

Enable the Lightweight IP functionality.

The Platform Settings will mark a warning icon. We will configure this at the last step.

Disable DHCP and manually set the IP

set MEM_SIZE to 10K

Now, we configure the Platform Settings. For Nucleo 144 boards (F429, H755 etc.), we need to set to LAN8742, which corresponds to the U9 PHY IC on the board.

/* USER CODE BEGIN 0 */

extern struct netif gnetif;

/* USER CODE END 0 */

...

  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */


    /* USER CODE BEGIN 3 */
    ethernetif_input(&gnetif);
  }
  /* USER CODE END 3 */

Testing

After configuration, the STM32 should be able to respond to ping requests.

Reference

Last updated

Was this helpful?