Ping not working on STM32F7 with FreeRTOS+TCP

Hello,

I’m currently facing a problem with my STM32F7. I cannot ping to this target.
I’ve confirmed that the PHY link status is high and do see this function “vDHCPProcess( pdFALSE );” getting called from prvIPTask.

But I’m not sure why can’t I see any ping or arp request working.

Can anyone of you help me with this?
I’ve attached my NetworkInterface.c, main.c, config files here.
FreeRTOSIPConfig.h (16.5 KB) FreeRTOSConfig.h (14.0 KB) main.c (11.3 KB) NetworkInterface.c (37.9 KB)

You code is using lwIP, not FreeRTOS+TCP. Where did you get the project from? Where did you get the STM32F7 driver from? Would the lwIP support mailing list be a better place to start?

I used the LwIp Application example from STM32F7 Cube Project. I’ve modified the code and ported the FreeRTOS+TCP based on the FreeRTOS+TCP Porting.

Driver for STM32F7 from STM32CubeF7 (Github:https://github.com/STMicroelectronics/STM32CubeF7)

lwip example works fine. But I’m trying to work on FreeRTOS+TCP. I used the LWIP existing project to make sure driver provided works fine or not.

Now I wanted to make a FreeRTOS+TCP working on STM32F7 or STM32H7. Sorry for the confusion here. I should have removed lwip related code. It’s removed project from Project subgroups.

The code you posted is not calling FreeRTOS_IPInit() (see https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial_Initialising_TCP.html) are you calling it anywhere?

Sorry, I mistakenly attached the wrong one. Here are the main file.
main_frtos_tcp.c (41.2 KB) NetworkInterface.c (37.9 KB)

It seems like the code ends up in one of the task:prvConnectionListeningTask

and finally asserted:
/* Attempt to open the socket. */
xListeningSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_STREAM, FREERTOS_IPPROTO_TCP );
configASSERT( xListeningSocket != FREERTOS_INVALID_SOCKET ); (This is where execution stays and disabled the interrupts which I believe may causing all tasks disabled)

I’m using BufferAllocation_2.c, heap_4.c.
But I’ve not set configAPPLICATION_ALLOCATED_HEAP this in my FreeRTOSConfig.h file.

I found from the FreeRTOS website, it says that return value is Invalid.
If there is insufficient FreeRTOS heap memory available for the socket to be created then FREERTOS_INVALID_SOCKET is returned.

I’m going to increase the Static HEAP Size in FreeRTOSConfig.h file and see how it goes.

Just to make sure, the latest release of the STM32Fxx driver can be found here.
But first you get your HEAP working.

Hello Hein,

Thanks for the link. Yes, I’ve picked up the latest release from this link. I can ping now to the target after increasing the HEAP size.

Thanks a lot.