2024-07-10 09:46 PM
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?
Solved! Go to Solution.
2024-07-12 12:01 PM
> 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!
2024-07-11 03:42 AM
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?
2024-07-11 05:33 PM
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.
2024-07-12 10:37 AM
"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.
2024-07-12 12:01 PM
> 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!