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.
ESP32-S3 with DM9051
-
- Posts: 207
- Joined: Fri May 07, 2021 10:35 am
Re: ESP32-S3 with DM9051
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.
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
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
Colman
-
- Posts: 207
- Joined: Fri May 07, 2021 10:35 am
Re: ESP32-S3 with DM9051
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
colman wrote: ↑Thu Apr 07, 2022 12:42 amI 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
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 wrote: ↑Thu Apr 07, 2022 7:02 amI 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.
-
- Posts: 207
- Joined: Fri May 07, 2021 10:35 am
Re: ESP32-S3 with DM9051
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)
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 191 guests