2024-08-16 05:11 AM - last edited on 2024-08-21 08:03 AM by SofLit
Dear Team,
I am using an STM32F407VET6 controller with STM32CubeIDE and FreeRTOS. I’m encountering a problem with thread management in my application. Please find below an overview of my setup:
All tasks are currently running at the same priority (osPriorityNormal). the stack size for all task is 4096
The http_task works fine when accessing the webpage. However, when I try to connect to my device via TCP( accessing the tcp_task), the issue arises and not able to access tcp_task, the issue arises. Attempting to establish a TCP connection consistently results in a "TCP connection failed" error. After repeated attempts, the device stops responding altogether.
I have been monitoring the ping response on the terminal window during this scenario, and the device fails to respond to pings when the issue occurs.
If I reset the device and connect a TCP client before opening the webpage, the tcp_task works fine. However, if I then try to access the webpage, the TCP client communication fails, and after several failures, the device stops responding altogether.
Only one task (http_task or tcp_task) can run properly at a time, but I need both tasks to function simultaneously.
If anyone has any insights or suggestions on how to resolve this issue, I would greatly appreciate your help. Your feedback would be invaluable to me.
Thank you.