Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network: Network auto-negotiation duplex fix for LAN8742 #4171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkerler
Copy link
Contributor

@bkerler bkerler commented Aug 30, 2024

On auto-negotiation using the external network phy LAN8742, the reference stm32f427 source code incorrectly uses the wrong PHY_SR (status register) addr of 0x10, leading to a false detection of the duplex mode, thus using half-duplex instead of duplex mode, resulting in retransmissions and overall lower throughput of data.

According to the LAN8742a datasheet, page 89, "4.2.22 PHY Special Control/Status Register" the addr is defined as 31 (0x1E), with duplex/half-duplex speed indicator given in bit 4..2.

This patch fixes the duplex mode for the ethernetif.c ... it might be necessary to patch the legacy HAL_ETH_Init as well within the lib/Drivers/STM32F4xx_HAL_Driver/Src/Legacy/stm32f4xx_hal_eth.c.

See further details here as well for reference.

Somewhat related to issue #3049 (not for wifi, but ethernet part)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant