Skip to main content
Visitor II
June 12, 2019
Question

STM32H743ZI NUCLEO 144 & LWIP - Can't Ping The Board

  • June 12, 2019
  • 7 replies
  • 3540 views

Hope all is going well. I'm trying to ping STM32H743ZI NUCLEO 144 using LWIP middle-ware. Code generated by CubeMX.

  • Configurations:
  1. Set the HCLK to 400 MHz
  2. Enabled the CPU ICache and DCache (under Cortex_M7 Configuration)
  3. Enabled MPU (Region0, Region1 & Region2)
  4. Enabled LWIP
  5. Selected LAN8742 as the Driver_PHY (under LwIP>Platform Settings)
  6. DHCP disabled (IP, MASK: 255,255,255,000 , Gateway: Modem IP)
  7. RTOS disabled
  8. LWIP_HTTPD (LWIP_HTTPD_CGI & LWIP_HTTPD_SSI enabled)
  9. LWIP_HTTPD_MAX_TAG_NAME_LEN set to 16
  10. ICMP enabled (LWIP_BROADCAST_PING and LWIP_MULTICAST_PING in LwIP Key Options>IPMP Options).
  11. Code Generated for Keil V5
  12. MX_LWIP_Process added to the main function in While loop.
while(1)
{
MX_LWIP_Process();
}

I don't know how should I configure the CubeMX or change the generated code to be able to ping my board.

    This topic has been closed for replies.

    7 replies

    Visitor II
    June 14, 2019

    I'm trying for two months and still not able to ping my board.

    ... Any supports for STM32H743ZI Nucleo 144 board?

    Visitor II
    May 23, 2020

    same face this problem in my stm32h743zi neculo board. if have any code for Ethernet UDP example please share us

    Visitor II
    May 23, 2020

    I was able to successfully awake LwIP on H747ZI and on F4 (on F4, CubeMX generated code worked), but not the one which is in CubeMX. A freshly generated project immendiately throws an ethernet DMA error on H7.

    Finally I found an example in CubeMX package, located in: STM32Cube\Repository\STM32Cube_FW_H7_V1.4.0\Projects\NUCLEO-H743ZI\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS and it works. Compiled with Atollic true studio (open SW4STM32\STM32H743ZI_Nucleo) and it will compile.

    Try to use this example as starting point.

    A very simple UDP echo example is here:

    struct netbuf *buf;
    static void udp_thread(void *arg)
    {
    	struct netconn *conn;
    	err_t err;
    	char buffer[256];
     
    	/* Create a new TCP connection handle */
    	conn = netconn_new(NETCONN_UDP);
    	netconn_bind(conn, IP_ADDR_ANY, 1234);
    	while (1)
    	{
    		err = netconn_recv(conn, &buf);
    		if (err == ERR_OK)
    		{
    		 /* no need netconn_connect here, since the netbuf contains the address */
    		 netbuf_copy(buf, buffer, sizeof(buffer));
    		 err = netconn_send(conn, buf);
    		 netbuf_delete(buf);
    		}
    	}
    }
     
    sys_thread_new("UDP2TH", udp_thread, NULL, 2048, 4);

    Visitor II
    May 26, 2020

    Thanks for reply.

    i not use RTOS. i seen stl32h743Zi example but it code is rtos based and also no any found code on UDP based 

    i also generated using Mx cube but it does not work.

    1. i faces some warning "The ETH can work only when RAM is 

      pointing at 0x24000000"

      I was searching but did not find how to solve that.

    2. I wrote code for ping command reply but it is not worked

    GPIO pin mapping

    PA1 ETH_REF_CLK

    PA2 ETH_MDIO

    PA7 ETH_CRS_DV

    PB13 ETH_TXD1

    PC1 ETH_MDC n/a

    PC4 ETH_RXD0

    PC5 ETH_RXD1

    PG11 ETH_TX_EN

    PG13 ETH_TXD0

    Enable 

    ICMP option

    code

     while (1)

     {

      /* USER CODE END WHILE */

     MX_LWIP_Process();

      /* USER CODE BEGIN 3 */

     }

    so i required UDP based example on STM32h743zi series.

    if have you so please provide us 

    Reguard's

    Hiren

    Visitor II
    May 24, 2020

    Thanks for reply.

    i not use RTOS. i seen stl32h743Zi example but it code is rtos based and also no any found code on UDP based 

    i also generated using Mx cube but it does not work.

    1. i faces some warning "The ETH can work only when RAM is 

      pointing at 0x24000000"

      I was searching but did not find how to solve that.

    2. I wrote code for ping command reply but it is not worked

    GPIO pin mapping

    PA1 ETH_REF_CLK

    PA2 ETH_MDIO

    PA7 ETH_CRS_DV

    PB13 ETH_TXD1

    PC1 ETH_MDC n/a

    PC4 ETH_RXD0

    PC5 ETH_RXD1

    PG11 ETH_TX_EN

    PG13 ETH_TXD0

    Enable 

    ICMP option

    code

     while (1)

     {

      /* USER CODE END WHILE */

     MX_LWIP_Process();

      /* USER CODE BEGIN 3 */

     }

    so i required UDP based example on STM32h743zi series.

    if have you so please provide us 

    Reguard's

    Hiren

    Visitor II
    May 26, 2020

    Why you don't using RTOS? It much easyer to do with RTOS.

    As I said above look after example which I linked, there complete lwip stack works. If one one CubeMX is broken then drop cube and use that example as starting point.

    Explorer
    May 26, 2020

    Also see https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet. If you use the code there, please post there it's working for you or any questions.

    Graduate II
    May 30, 2020

    > It much easyer to do with RTOS.

    Oh, really? That's why ST's brainless code monkeys still haven't understood multi-threading since the year 2007, right? :) Actually, if one has a decent cooperative scheduler and software timers, then implementing lwIP for simple projects is easier without RTOS. But, if the project is complex or has real-time requirements, then it's "easier" to do it with RTOS.