2020-02-18 11:39 AM
Hello,
I ask for support as I do not have much experience with RTOS + LWIP implementation on STM boards.
Problem: After processing TCP message, other RTOS tasks are getting killed.
Program:
I have made a simple program to test TCP server functionality with LWIP and FreeRTOS. For now I am trying to process incoming TCP message with a server socket on STM. I am using netconn API with LWIP, the processing is done in TCP_Server_Task. Besides that I have created two generic taks blinking the user LEDs to get the idea of the RTOS working (TEST_Task and TEST1_Task).
Board: STM32F7676ZI
Observed behaviour:
Debugging results:
What I have found out is that the tasks are killed after executing netconn_write function in process_connection function. netconn_write, however, returns ERR_OK.
main.c attached.
2020-02-18 02:57 PM
tcpip_thread stack overflow?
Suggest step the code.
2020-02-18 03:24 PM
Thanks for the reply, I am trying to step debug but did not find any root cause.
I think worth mentioning is that it happens with the first try of the TCP communication.
I have tried to increase the TCP stack size to 2048 but it did not help.
2020-02-18 04:20 PM
Try Googling "freertos task disappear" for discussions.