Closed tresler closed 2 months ago
@tresler, do you have your custom designed board with W5500 or do you use some evaluation board?
@tresler, do you have your custom designed board with W5500 or do you use some evaluation board?
Thank for response. As I wrote I use RJ-45 transformer jack with transformer connected to W5500-io WIZnet modul connected to ESP32-S3-WROOM.
Is ESP32 connected to the W5500 module via wires?
Is ESP32 connected to the W5500 module via wires?
I have everything connected using my own PCB board. And yes everything is connected, I tested it three times.
The reason why I asked is it looks like the SPI message is corrupted.... It's usually caused by problems with signal integrity. Long, non-matching length wires are usual suspect. However, it can also happen on PCB when signal path is not properly designed. What is the SPI frequency you use? If it's higher than 16 MHz, try to decrease it.
I understand. I was try it with 10 MHz, 4 MHz and 1 MHz, unfortunately without big effect. It just moved the error message a few packets further. I still think it has to be something with the memory (not free(buffer);) and with the PSRAM and using the i2sdriver for the led. As I wrote if I using same code only with FastLED without i2cleddriver and PSRAM, everything seems to work. When I use driver and send some sACN packet, I have error message.
w5500.mac: received frame was truncated
should never occur under normal conditions. Therefore, I presume the SPI frame is corrupted. It can be caused by HW (PCB) or the message could theoretically be corrupted by the DMA. Do you observe the issue when you use PSRAM but without i2cleddriver? Or vice versa, do you observe the issue if you use i2cleddriver but without PSRAM? We need to isolate issue as much as possible. Thanks for your help!
All right. Unfortunately led driver need PSRAM, so I can not run program with driver a without PSRAM. When I set PSRAM to OPI and don't use driver everything seems to work without a problem. When I use i2cledriver, after few packet I have error. If I use driver without eth.h only with wifi or Ethernet_Generic library, I don't see the problem there again.
Edit: Okay, so I must correct myself and apologize. With Ethernet_generic library was everything ok, but when I use W6100-io and not now with W5500-io (what I change on same PCB for ETH support). Now I try Ethernet.h, EthernetESP32, Ethernet_generic and it was same as ETH.h. Not error message but it also got stuck shortly after few packet. I realized that I have on the same SPI bus SD card reader. It works by itself without any problem even in the case of a non-functioning driver. I try mechanically cut off the SPI bus to SD card reader and now everything seems to work. So problem is to using same SPI bus for W5500 and SD card reader and also use i2sleddriver. Unfortunately I can not use different SPI bus on ESP32s3.
The SPI Ethernet module should work along with other device on the same SPI bus when both drivers use the same SPI driver. This is the reason why we recently introduced SPI layer abstraction for our SPI Ethernet module drivers.
@me-no-dev, could you please check the issue if this is the case?
@tresler any update about the issue? Do you use the same SPI driver for both SPI devices?
I cut paths on the board to SD card reader and now ethernet works fine. Unfortunately now I cannot test two separately SPI bus because I don't have any devices for test.
I see, so not much to do right now... :/
I think the following could be the issues: 1) If you use Arduino, be sure the W5500 and SD card reader use the same SPI driver. 2) Make sure that CS is correctly handled for both devices.
As such I'm closing the issue. Feel free to reopen or open a new one if you have more detailed information.
Answers checklist.
IDF version.
release/v5.1 bd2b9390ef
Espressif SoC revision.
ESP32-S3
Operating System used.
Linux
How did you build your project?
Other (please specify in More Information)
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-WROOM
Power Supply used.
External 3.3V
What is the expected behavior?
ESP32-S3
What is the actual behavior?
After few moment I have error:
w5500.mac: received frame was truncated
and few more second:w5500.mac: emac_w5500_transmit(577): free size (1) < send length (350)
Steps to reproduce.
Debug Logs.