Skip to content

EMACInterface::connect() always succeeds with an incorrect PHY address #12416

@timovanasten

Description

@timovanasten

Description of defect

We use a custom board based on the NUCLEOF767ZI, but we've used another PHY transceiver than the one on the NUCLEO for the Ethernet connectivity. We had to change the PHY address for this but noticed that EMACInterface::connect() always returns 0 (i.e. success) when using an incorrect PHY address. I think the desired response should be an error in this case. We suspect that this is caused by the fact that when PHY address is configured incorrectly, the HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) in stm32f7xx_hal_eth.c seems to always return 0b1111111111111111 if the PHY is incorrect.

Target(s) affected by this defect ?

NUCLEOF7xx, Custom targets based on STM32F7xx targets

Toolchain(s) (name and version) displaying this defect ?

gcc-arm-none-eabi 9.2.1

What version of Mbed-os are you using (tag or sha) ?

5.15

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli 1.10.2

How is this defect reproduced ?

For the NUCLEOF767ZI, change the ETH_ARCH_PHY_ADDRESS defined stm32xx_emac.cpp from (0x00) to (0x01). Then call NetworkInterface::get_default_instance().connect(). This will always return 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions