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

status register value always reads 0x0000 in eth_mcux_phy_setup #23221

Closed
armandciejak opened this issue Mar 3, 2020 · 1 comment · Fixed by #23318
Closed

status register value always reads 0x0000 in eth_mcux_phy_setup #23221

armandciejak opened this issue Mar 3, 2020 · 1 comment · Fixed by #23318
Assignees
Labels
area: Ethernet bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: medium Medium impact/importance bug

Comments

@armandciejak
Copy link
Contributor

armandciejak commented Mar 3, 2020

Describe the bug
In drivers/ethernet/eth_mcux.c:eth_mcux_phy_setup ENET_ReadSMIData is called right after calling ENET_StartSMIRead without waiting for the MII interrupt, which leads to the value of the status variable to always be 0x0000.

The correct sequence is documented in the i.MX RT1060 reference manual in chapter 41.7.17.4.

I've hacked the eth_mcux_phy_setup function to poll the EIR register until the MII interrupt bit is set before reading the status register and it works (i.e. the content of the status register is correctly retrieved).

Expected behavior
Status register value is correctly retrieved.

Impact
Calling eth_mcux_phy_setup has no effect.

Environment (please complete the following information):

  • OS: Linux (Ubuntu 18.04)
  • Toolchain: Zephyr SDK 0.10.3
  • Commit: 9f7cccc

Additional context
This problem occurs on a custom board equipped with the IMXRT1062 MCU but should occur as well with the MIMXRT1060-EVK.

@armandciejak armandciejak added the bug The issue is a bug, or the PR is fixing a bug label Mar 3, 2020
@jhedberg jhedberg added the priority: medium Medium impact/importance bug label Mar 3, 2020
@armandciejak
Copy link
Contributor Author

I tested it on the MIMXRT1060-EVK board and the problem is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Ethernet bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants