cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet Request time out issue

prathmeshpatil06
Associate

 

Hello everyone,

I am working with an STM32H5 series board and have successfully initialized Ethernet using the lwIP stack.
The DHCP process works correctly — I am able to obtain an IP address.

However, I am facing a “Request Timeout” issue when I try to communicate with other devices or servers over the network.

Below is my sys_check_timeouts() function (default lwIP implementation):

 

 
void sys_check_timeouts(void) { u32_t now; LWIP_ASSERT_CORE_LOCKED(); now = sys_now(); do { struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); tmptimeout = next_timeout; if (tmptimeout == NULL) { return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { return; } next_timeout = tmptimeout->next; handler = tmptimeout->h; arg = tmptimeout->arg; current_timeout_due_time = tmptimeout->time; memp_free(MEMP_SYS_TIMEOUT, tmptimeout); if (handler != NULL) { handler(arg); } LWIP_TCPIP_THREAD_ALIVE(); } while (1); }

My setup:

  • Controller: STM32H5 series

  • Ethernet initialized via CubeMX

  • lwIP stack enabled (DHCP client working fine)

Issue:

  • DHCP successfully assigns an IP address

  • But when I send data or ping a remote server, I get a Request Timeout

Question:

  • Is there something I might be missing regarding how often sys_check_timeouts() should be called?

  • Could it be related to sys_now() .

Any suggestions or guidance would be appreciated!

Thank you.

2 REPLIES 2
Mmd1
Associate

hi,
I have the same issue, and I haven't been able to find the right answer. I set all values in STM32CubeMX based on this document, but it still doesn't work for me. I'm using stm32h750 series micro.


If you find anything, I would be glad to announce myself too.

I realized the solution: it's important to reset the PHY_Device (mine is lan8720) before initializing the device and LWIP. You should find the reset pin in the PHY and reset it in the GPIO_Init() function.