cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet Rx Interrupt Issue on STM32F4

Ravi Ramesh
Associate
Posted on April 24, 2018 at 03:32

I am currently using a STM32F407 board, with ethernet enabled in Interrupt mode, for the most part it works fine for

UDP

, I have the STM communicating to a another device via UDP using a switch, and in response to the STM request, the other device responds with some data over a switch. 

But when there is a lot of ARP'ing on the switch, due to other devices communicating, the STM, does not trigger the Rx interrupt/callback. I used wireshark to confirm that the packet was delivered to the port where the STM is connected to the switch. But the STM does not fire the Rx interrupt, and this only occurs where there is a lot of ARP/broadcast traffic (maybe 10-15 packets a second)on the switch.

#ethernet #interrupt #stm32 #ethernet-interrupt #stm32f7-receive-interrupt #interrupt-issue
1 REPLY 1
Ravi Ramesh
Associate
Posted on April 25, 2018 at 04:57

Adding Trace Prints from LwiP

This is behavior  in the good case (steady state)

ethernet_output: sending packet 0x20004320 . -> STM32f4 request

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:0 -> Response from Slave device

ethernet_output: sending packet 0x20004320 -> STM32f4 request

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:0

-

Response from Slave device

 But when there is some broadcast traffic 

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff

etharp_update_arp_entry: 10.161.0.2 - 54:e1:ad:4c:b0:98

etharp_find_entry: found empty entry 1

etharp_find_entry: no empty entry found and not allowed to recycle

etharp_input: incoming ARP request

etharp_input: ARP request was not for us.

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff

etharp_update_arp_entry: 10.161.0.2 - 54:e1:ad:4c:b0:98

etharp_find_entry: found empty entry 1

etharp_find_entry: no empty entry found and not allowed to recycle

etharp_input: incoming ARP request

etharp_input: ARP request was not for us.

etharp_timer

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff -> ARP 

ethernet_output: sending packet 0x20004320

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff -> ARP

ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff ->ARP

ethernet_output: sending packet 0x20004320 -> STM32f4 request

ethernet_output: sending packet 0x20004320 -> STM32f4 request

ethernet_output: sending packet 0x20004320 -> STM32f4 request

ethernet_output: sending packet 0x20004320 -> STM32f4 request

ethernet_output: sending packet 0x20004320-> STM32f4 request

The STM sends multiple request's, and using wireshark I can see the slave responding, but the Rx interrupt is not triggered. And I am uanble to receive any more Rx Interrupts after this