2025-01-05 10:18 PM - edited 2025-01-06 02:24 AM
Hi Team,
I am Using STM32F7 nucleo board, I created project using ST CUBEIDE version 1.16.0.
Note: NOT USING CUBEMX and RTOS
I have taken a ref code for low level eth functions ethernetif.c and lwip.c.
I Enabled Enable DHCP, Http and SSI it is working fine I am able to interact my webpage.
Now I want to work on TCP and ping, I enabled LWIP_ICMP and LWIP_TCP, Disabled DHCP.
But Ping NOT working (timeout err ).
I have taken care of
1.Proper pin assignment.
2.Configuring PHY properly. (as I m able to get Eth cable linkup/down notify).
3.Disable DHCP and activate ICMP.
I have gone thr icmp.c the code flow whenever i ping
-> ethernetif_input-> ethernet_input->icmp_input -- checks type and switch to ICMP_ECHO--> Ip4_outputif()-->ip4_outputif_src-->netif_output-->low_level_output--> HAL_ETH_Transmit
i debuged icmp.c it was not going to 1.icmp_dest_unreach 2.icmp_time_exceeded
I have attached my files,
Please correct me where it goes wrong and reason behinds.
Thank you
2025-01-06 05:46 AM
Hello @lavanya ,
Can you specify the exact STM32F7 MCU reference you are using?
check that you did necessary modifications to the linker script (flash.ld file) to properly place descriptors and RX pool for LWIP insure proper configuration of MPU as well.
you can check this article for more information .
Regards
2025-01-06 09:21 PM
@STea thank you for your response,
I am using STM32F746ZG nucleo board. without freeRTOS (Bare metal),
Note: I am not using CubeMx.
__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END; __ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END; __ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; __ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END;
I have aligned memory for DMA Descriptors. This is working for http.
Now, I enabled ICMP but ping not working.
any guidance on it
2025-01-07 06:57 AM
Hello @lavanya ,
If it is working in you HTTP server it means that your pc recognizes the path to your MCU, and this IP address is available in your PC routing table so I think you should be able to ping it even while the server is running with ICMP enabled.
Regards