Program stucks at ethernet_input function,LWIP ethernet deadlock.
Hi,
I am using FreeRTOS+LWIP on stm32f429zi. All working fine but after some time program control stucks at ethernet_input function. so due to this context switching not happens and other tasks gets affected.
I also tried the below solution obtained from forum, but not working this.
Solution
This code:
- if(HAL_ETH_GetReceivedFrame_IT(&EthHandle) != HAL_OK)
- return NULL;
Must be replaced with this code:
HAL_StatusTypeDef status;
LOCK_TCPIP_CORE();
status = HAL_ETH_GetReceivedFrame_IT(&EthHandle);
UNLOCK_TCPIP_CORE();
if (status != HAL_OK) {
return NULL;
}
ethernet_input function is :
