ESP32-S3 with DM9051

colman
Posts: 37
Joined: Mon May 30, 2016 7:41 am

ESP32-S3 with DM9051

Postby colman » Fri Apr 01, 2022 5:25 am

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.

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

Re: ESP32-S3 with DM9051

Postby ESP_ondrej » Wed Apr 06, 2022 9:56 am

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.

colman
Posts: 37
Joined: Mon May 30, 2016 7:41 am

Re: ESP32-S3 with DM9051

Postby colman » 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

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

Re: ESP32-S3 with DM9051

Postby ESP_ondrej » 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.

Helpsen
Posts: 3
Joined: Sat Jan 14, 2023 9:21 am

Re: ESP32-S3 with DM9051

Postby Helpsen » Sat Jan 14, 2023 9:25 am

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

Helpsen
Posts: 3
Joined: Sat Jan 14, 2023 9:21 am

Re: ESP32-S3 with DM9051

Postby Helpsen » Sat Jan 14, 2023 9:34 am

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.

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

Re: ESP32-S3 with DM9051

Postby ESP_ondrej » Tue Jan 17, 2023 8:23 am

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)

Who is online

Users browsing this forum: No registered users and 87 guests