cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f429 ethernet speed control

inkong
Associate II

Hi,

I want to make the system with stm32f4 series mcu.

 

An important function of the system is to control the Ethernet speed.

Is it possible to adjust the Ethernet speed with such detailed figures as 65Mbps, 38Mbps, and 300Kbps??

If possible, how can I adjust it?

 

When I looked at the data sheet and reference manual, the only values that could be set at the register level were 10Mbps and 100Mbps.

I thought Changing the main operating clock on the mcu could increase and decrease the Ethernet speed, but would the way I thought work?

1 ACCEPTED SOLUTION

Accepted Solutions

I've only been using communications marked in Mhz units, so I don't think I understand bps very well.

As Bob explained. If Mega bits/sec is more palatable, use these units ))

I want to set different Ethernet speeds

Unfortunately we do not always get what we want. The "speed" is determined by the hardware (PHY) and network infrastructure (switches). STM32 usually works at 100 Mbps, as its MAC is limited to 100 Mbps. But with a gigabit PHY it can connect to gigabit networks.

A whole packet flies at fixed bit rate. It is like a bullet. But you can regulate number of shots per unit of lime.

can I understand that you adjust bit/s by specifying the max speed of Ethernet and then deciding the size of the Ethernet packet and how many packets per second to send?

If this is what you're after, then yes, based on the nominal bitrate  you decide the size of packets and how many packets per second to send. Note that the actual number of bytes moved per second differs from the nominal bitrate because of random delays between packets and other factors. TL;DR. So you need to measure the actual data rate and adapt dynamically.  Good luck!

 

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

No, this is not how Ethernet works. Can you clarify the requirement? Do you want to restrict the [average] transmit rate by N bytes per second?

Hello, Pavel
First of all, thank you for answering.

 

From your reply, I could see that I had a wrong understanding of Ethernet.
This is my first time designing a system with Ethernet, so I'm very inexperienced with related theories.

 

To think again based on your answer, can I understand that you adjust bit/s by specifying the max speed of Ethernet and then deciding the size of the Ethernet packet and how many packets per second to send?

If Ethernet works like that, what I'm curious about is below.

 

1. Does sending and receiving 45Mbps of data on Ethernet with a Max speed of 100Mbps have exactly the same performance as sending and receiving 45Mbps of data on Ethernet with a Max speed of 60Mbps?
2. Is the transmission/reception delay rate of the packet and the loss rate of the data packet the same in the first two examples??

 

I've only been using communications marked in Mhz units, so I don't think I understand bps very well....
I want to set different Ethernet speeds to send data continuously and observe the loss rate and delay rate of Ethernet packets according to speed.

"bps" = bits per second.  8 bits = 1 byte.  "MHz" is a frequency (Hz = cycles per second) and some people (incorrectly) use that when they talk about bit rates.

Wired Ethernet has 1, 10, 100, 1G, 10G, 40G (I think) bit/sec raw data rates.  You cannot select anything else.  Wireless connections have different data rates (WiFi, Bluetooth, etc.).

Your example of sending "45Mbps of data" doesn't make sense.  "45Mbps" is a data RATE, and sending at that RATE always takes the same amount of time by definition.

If instead you mean sending 45M Bytes of data, then the time it takes to send that block of data will vary depending on the Ethernet interface's bit rate.  It will take longer to send on a 10Mbps link that it will on a 100Mbps or 1Gbps link.

I've only been using communications marked in Mhz units, so I don't think I understand bps very well.

As Bob explained. If Mega bits/sec is more palatable, use these units ))

I want to set different Ethernet speeds

Unfortunately we do not always get what we want. The "speed" is determined by the hardware (PHY) and network infrastructure (switches). STM32 usually works at 100 Mbps, as its MAC is limited to 100 Mbps. But with a gigabit PHY it can connect to gigabit networks.

A whole packet flies at fixed bit rate. It is like a bullet. But you can regulate number of shots per unit of lime.

can I understand that you adjust bit/s by specifying the max speed of Ethernet and then deciding the size of the Ethernet packet and how many packets per second to send?

If this is what you're after, then yes, based on the nominal bitrate  you decide the size of packets and how many packets per second to send. Note that the actual number of bytes moved per second differs from the nominal bitrate because of random delays between packets and other factors. TL;DR. So you need to measure the actual data rate and adapt dynamically.  Good luck!