We have an STM32 based board + W5500. We have used FreeRtos for our firmware and integrated the DHCP from WizNet IO lib. The DHCP works on boot but when we try to run it from Task/Main loop to update the lease it is unable to make request. I cannot see the logs in Wireshark.
We have a task calling DHCP_time_handler on every second & DHCP_Run() but not making request when lease time is half of dhcp_tick_1s ((dhcp_lease_time != INFINITE_LEASETIME) && ((dhcp_lease_time/2) < dhcp_tick_1s)). Also I have noticed one more thing it’s not making proper request but breaking webserver part.
Thanks for your reply. I think, I resolved it, made some FreeRtos task related configuration changes and also changed logic for DHCP_time_handler, still testing. But now I have one more issue, it breaks the HTTP after renewing the DHCP lease. So do you have any idea which specific part to check for this issue? Do you think I have to close the socket before making the DHCP renew request?
I found solution, there was a problem with DHCP_IP_LEASED case and web server start/stop flag.
So my mistake was to enable the web server flag before receiving the DHCP_ACK for REREQUEST, enabled it after receiving the DHCP_ACK and it works. Still breaks sometime, after 1 or 2 hours and sometime longer so looking into it.