Question
Restarting the ethernet + OS
Hello everyone.
What is the proper procedure when restarting the entire ethernet?
Im using LWIP and FreeRTOS and im not sure if im restarting everything correctly...
These are the steps im using.
- Terminate TCP Server thread.
netif_set_down(&gnetif);
netif_remove(&gnetif);
netconn_delete(Connection);
osThreadTerminate(ThreadID);
- HAL
HAL_ETH_Stop(&heth);
HAL_ETH_DeInit(&heth);
HAL_ETH_Init(&heth);
HAL_ETH_Start(&heth);
- Start TCP server
netif_set_ipaddr(&gnetif, ip);
netif_set_up(&gnetif);
ThreadID = osThreadNew(TCP_Thread, NULL, &TCP_Thread_attributes);
What steps am i missing?
Thanks for any replies :)
