Skip to main content
Graduate II
May 5, 2025
Question

TCP fasttmr

  • May 5, 2025
  • 2 replies
  • 701 views

I have created TCP client on my STM32H723 module. Now I am stress-testing the code by abruptly closing the server before the TCP client could connect. As per my code it retries TCP connection after 30 seconds. But after multiple times the code freezes. I debugged it and it was getting stuck in tcp_fasttmr function:

jowakar122_0-1746443447701.png All the conditions under the while are not satisfied so it directly jumps to line 1519 and back 1489.

 

    This topic has been closed for replies.

    2 replies

    ST Employee
    May 12, 2025

    Hello @jowakar122,

     

    Thank you for your contribution. This issue is being tracked internally. An internal ticket (209492) has already been raised for follow-up.

     

    With Regards,

    ST Employee
    June 17, 2025

    Hello,

    Could you please confirm if you are using an RTOS and whether the tcp_fasttmr API is being called exclusively from a single context?

    For your implementation, it is important to ensure compliance with the multithreading guidelines outlined here: https://www.nongnu.org/lwip/2_1_x/multithreading.html.

     

    With Regards,

    Graduate II
    September 27, 2025

    @ASEHST 
    - What is the correct way to init a TCP connection?
    - Do we have to close the TCP connection every time I have to initialize TCP after the previous connection was lost? 
    - or the TCP library takes care of closing the previous connection and free the old pcb before creating new