STM32F7 + FreeRTOS + LWIP tasks disappearing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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:
- System power on
- Both user LEDs blinking, TEST_Task and TEST1_Task running, TCP server socket listening on port 5555. (state shown in Screenshot1 attached)
- send a message "A" to the TCP server port 5555 from PC based client (connection directly via ETH crossover cable)
- Message gets processed (state shown in Screenshot2 attached)
- After message being processed all the tasks including the TEST_Task and TEST1_Task are gone/killed, LEDs stop blinking. (state shown in Screenshot3 and Screenshot4 attached)
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.
- Labels:
-
Ethernet
-
FreeRTOS
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-18 2:57 PM
tcpip_thread stack overflow?
Suggest step the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-18 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-18 4:20 PM
Try Googling "freertos task disappear" for discussions.
