Page 1 of 1

ESP32-S3 with DM9051

Posted: Fri Apr 01, 2022 5:25 am
by colman
I am use IDF version 4.4, I have a problem in using DM9051 SPI ethernet controller.
The "RX Memory Overflow Error" of "RX Status Register" is set frequently, and sometimes it reports "last transmit still in progress, cannot send." I try to force it to run 10Mbps only, but the error still happens. Do anyone have some idea on this?

Colman.

Re: ESP32-S3 with DM9051

Posted: Wed Apr 06, 2022 9:56 am
by ESP_ondrej
Do you use some Espressif's example for testing (e.g. iperf)? What is your SPI Clock frequency settings? What is a traffic you are trying to receive?

I unfortunately don't have any comprehensive iperf performance figures available right now. However, what I found in some old DM9051 related MRs, is that Tx/Rx was around ~7 Mbps @ SPI CLK 12 MHz. Therefore, configuring the network connection to 10Mbps may not help.

Re: ESP32-S3 with DM9051

Posted: Thu Apr 07, 2022 12:42 am
by colman
I have not tested with iperf. For the problem above, I have found out the cause, it is due to the CS setup timing to small when running the spi clock at 40MHz. After I set the clock back to 20MHz, it works fine. Since DM9051 support 100Mbps, and it can run at 50MHz clock, I want the spi bus speed to run at a faster rate. However, any value in the CS setup time other than zero will make it not working, I have no other way to make the spi bus run faster.

Colman

Re: ESP32-S3 with DM9051

Posted: Thu Apr 07, 2022 7:02 am
by ESP_ondrej
I see, thanks for additional information. You can also try to play with `input_delay_ns` SPI configuration parameter. It helped me to make SPI work at higher frequencies. Please also make sure you have proper SPI signal routing in your PCB design.

Re: ESP32-S3 with DM9051

Posted: Sat Jan 14, 2023 9:25 am
by Helpsen
colman wrote:
Thu Apr 07, 2022 12:42 am
I have not tested with iperf. For the problem above, I have found out the cause, it is due to the CS setup timing to small when running the spi clock at 40MHz. After I set the clock back to 20MHz, it works fine. Since DM9051 support 100Mbps, and it can run at 50MHz clock, I want the spi bus speed to run at a faster rate. However, any value in the CS setup time other than zero will make it not working, I have no other way to make the spi bus run faster.

Colman

Re: ESP32-S3 with DM9051

Posted: Sat Jan 14, 2023 9:34 am
by Helpsen
ESP_ondrej wrote:
Thu Apr 07, 2022 7:02 am
I see, thanks for additional information. You can also try to play with `input_delay_ns` SPI configuration parameter. It helped me to make SPI work at higher frequencies. Please also make sure you have proper SPI signal routing in your PCB design.
I got the esp32s3-devkitc-v1, have same question in improve SPI frequencies. Do you have recommander value about `input_delay_ns` SPI configuration parameter. Like work in 40MHz/50MHz.

Re: ESP32-S3 with DM9051

Posted: Tue Jan 17, 2023 8:23 am
by ESP_ondrej
Regarding `input_delay_ns`, you need to do proper analysis of your PCB to get the right value. Or you could find it by trial and error... The former approach is preferred of course.

If you want to use SPI at frequencies higher than 26.6 MHz in full duplex mode, you need to use IO_MUX pins. See https://docs.espressif.com/projects/esp ... iderations to find more information.

You also need proper PCB design to run the SPI at such high frequencies (https://resources.pcb.cadence.com/blog/ ... ut-routing)