2025-04-08 6:36 AM - edited 2025-05-11 7:20 AM
Hi,
The STM32H7RSxx TRM specifies, for ETH_MACMDIOAR, the following CSR values:
Bits 11:8 CR[3:0]: CSR Clock Range
The CSR Clock Range selection determines the frequency of the MDC clock according to
the CSR clock frequency (eth_hclk):
0000: MDC clock = eth_hclk / 42
0001: MDC clock = eth_hclk / 62
0010: MDC clock = eth_hclk / 16
0011: MDC clock = eth_hclk / 26
0100: MDC clock = eth_hclk / 102
0101: MDC clock = eth_hclk / 124
0110 to 0111: Reserved, must not be used
The suggested range of CSR clock frequency applicable for each value (when Bit 11 = 0) ensures that the MDC clock is approximately between 1.0 MHz to 2.5 MHz frequency range.
When Bit 11 is set, you can achieve a higher frequency of the MDC clock than the frequency limit of 2.5 MHz (specified in the IEEE 802.3) and program a clock divider of lower value.
For example, when CSR clock is of 100 MHz frequency and you program these bits to 1010, the resultant MDC clock is of 12.5 MHz which is above the range specified in IEEE 802.3. Program the following values only if the interfacing chips support faster MDC clocks:
1000: eth_hclk / 4
1001: eth_hclk / 6
1010: eth_hclk / 8
1011: eth_hclk / 10
1100: eth_hclk / 12
1101: eth_hclk / 14
1110: eth_hclk / 16
1111: eth_hclk / 18
Value 2 (0010) and 14 (1110) are repeated for eth_hclk / 16.
Also, there is a jump from eth_hclk/62 to eth_hclk /16, then to eth_hclk/26 and then to eth_hclk/102.
These seems strange values and jumps..
Is it possible that might be some error?
Could someone clarify?
Thanks,
s.
Solved! Go to Solution.
2025-05-14 8:59 AM
Hello @simo zz;
After checking internally, it seems that there is no error.
Both (0010) and (1110) represent eth_hclk divided by 16.
The difference is that when Bit11 is set, faster MDC clocks can be achieved due to a lower divider. However, eth_hclk divided by 16 can be achieved with both (0010) and (1110).
If you want to use MDC between 1MHz and 2.5MHz as per defined IEEE802.3, keep bit 11 reset (CR[3])."
The ethernet is licensed from our partner. So, the coding order is provided by our partner.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-08 2:09 AM
Hello @simo zz;
I will check this internally and I will come back to you as soon as possible.
Internal ticket number: 209165 (This is an internal tracking number and is not accessible or usable by customers)
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-14 8:59 AM
Hello @simo zz;
After checking internally, it seems that there is no error.
Both (0010) and (1110) represent eth_hclk divided by 16.
The difference is that when Bit11 is set, faster MDC clocks can be achieved due to a lower divider. However, eth_hclk divided by 16 can be achieved with both (0010) and (1110).
If you want to use MDC between 1MHz and 2.5MHz as per defined IEEE802.3, keep bit 11 reset (CR[3])."
The ethernet is licensed from our partner. So, the coding order is provided by our partner.
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-05-15 4:18 PM
Thank you @KDJEM.1
2025-05-16 12:40 AM - edited 2025-05-16 12:43 AM
Hello @simo zz;
Thank you for your contribution in STCommunity.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which answered your question.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.