Home > other >  STM32H7 + judging how LWIP Ethernet to receive the data?
STM32H7 + judging how LWIP Ethernet to receive the data?

Time:09-17

 void ETH_IRQHandler (void) 
{
OS_ERR err;

OSSemPost (& amp; NETRCV_Sem OS_OPT_POST_1, & amp; Err);

__HAL_ETH_DMA_CLEAR_IT (& amp; LAN8720_ETHHandle ETH_DMA_NORMAL_IT);//remove the DMA interrupt flag bit
__HAL_ETH_DMA_CLEAR_IT (& amp; LAN8720_ETHHandle ETH_DMA_RX_IT);//remove the DMA receiving interrupt flag bit
__HAL_ETH_DMA_CLEAR_IT (& amp; LAN8720_ETHHandle ETH_DMA_TX_IT);//remove the DMA receiving interrupt flag bit
}


Did not receive data will also enter the interrupt, call the function can be judged data is received? Otherwise often perform OSSemPost (& amp; NETRCV_Sem OS_OPT_POST_1, & amp; The err),

CodePudding user response:

I've tried
 if (__HAL_ETH_DMA_GET_IT (& amp; LAN8720_ETHHandle ETH_DMA_RX_IT)) 
OSSemPost (& amp; NETRCV_Sem OS_OPT_POST_1, & amp; Err);

This also not line

CodePudding user response:

Why feel you and me is not the same??
I didn't interrupt part, has been the lwip,

CodePudding user response:

refer to the second floor writeing response:
is what feeling is not the same as you and me??
I have always been the lwip part without interruption,,


To interrupt call ethernetif_input () this function
  • Related