Page 1 of 1

ESP32 + ENC28J60 UDP duplex issue

Posted: Mon Feb 28, 2022 7:58 am
by mldevw
Hello,

I do have an issue with my setup:
- ESP32-WROVER-IE
- Wifi disabled
- Ethernet via ENC28J60 lib from examples
- UDP Multicase Setup according to examples
- One Thread sending UDP messages cyclically (forwarding from a UART stream)
- One Thread receiving UDP messages (sound forwarded to i2s driver)

When I am just sending data from the esp32 it works fine and data is sent in about 30 ms - 40 ms cycles.
When there is also data sent to the esp32 (i.e. the broadcast group) then every few seconds there is not coming data from the esp and a short noise in audio, indicating a lost/too late incoming frame.

I used perfmon, both cores are < 10 % CPU
I am using 240 MHz Clock
SPI is running at 6.5 MHz (my pcb doesn't allow for higher clock)

I have traced it with wireshark, see picture below.

Is this issue known to you?
What could be the issue, what could I look for?

Thanks in advance.

Kind regards

Image

Re: ESP32 + ENC28J60 UDP duplex issue

Posted: Tue Mar 01, 2022 5:35 am
by mldevw
Hello,

I also checked, this issue happens with unicast.
Minimum viable example is based on the udp_client but with one thread receiving (without any serial/debugging output) and one thread sending a 64 byte message every 10 ms.

Thanks in advance.

Re: ESP32 + ENC28J60 UDP duplex issue

Posted: Wed Mar 23, 2022 11:40 am
by ESP_ondrej
Hi,

could you please be more specific of how long are both received/transmitted packets and what are the rx/tx periods? (you were specific only for Tx and Tx period varies in each of your posts)
How do you realize the Tx period?
What is or RTOS tick configuration?
How many packets is usually missed?

Thanks