ESP32 + ENC28J60 UDP duplex issue

mldevw
Posts: 4
Joined: Sat Dec 04, 2021 12:45 pm

ESP32 + ENC28J60 UDP duplex issue

Postby mldevw » Mon Feb 28, 2022 7:58 am

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

mldevw
Posts: 4
Joined: Sat Dec 04, 2021 12:45 pm

Re: ESP32 + ENC28J60 UDP duplex issue

Postby mldevw » Tue Mar 01, 2022 5:35 am

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.

ESP_ondrej
Posts: 211
Joined: Fri May 07, 2021 10:35 am

Re: ESP32 + ENC28J60 UDP duplex issue

Postby ESP_ondrej » Wed Mar 23, 2022 11:40 am

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

Who is online

Users browsing this forum: ESP_Roland and 80 guests