heinbali01 wrote on Saturday, May 25, 2019:
Hi Andy,
I’m sure that you have seen the DHCP application hook:
#if( ipconfigUSE_DHCP_HOOK != 0 )
eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t ePhase, uint32_t ulIPAddress )
{
}
#endif
With this hook, you can instruct the DHCP module to either stop or continue the negotiation.
FreeRTOS_IPInit()
can be called only once because it creates a queue and it starts the IP-task.
I’m afraid there is no way to re-initialise the IP-stack, other than a reset of the CPU.
If there is only a small change, like the assigning a new IP-address and netmask, and provided that there are no open sockets, you might not need to reboot.