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

Add support for GMAC/PHY #30

Open
john-terrell opened this issue Apr 7, 2021 · 2 comments
Open

Add support for GMAC/PHY #30

john-terrell opened this issue Apr 7, 2021 · 2 comments
Assignees

Comments

@john-terrell
Copy link
Contributor

No description provided.

@john-terrell john-terrell self-assigned this Apr 7, 2021
@se7kn8
Copy link

se7kn8 commented Jan 7, 2023

Hello,
I don't know if you're still working on the ethernet support for the atsam4e, but I've seen your branch and tested it myself to get ethernet support working. (Or if anyone else want to implement it and have some problems with it)

There were two things, that I needed to change to get it working:

  1. In ethernet/tx.rs:
    Change
    pub fn set_last(self) -> Self {
        Writer(self.0, self.1 & !(1 << Word1BitNumbers::LastBuffer as u32))
    }

to

    pub fn set_last(self) -> Self {
        Writer(self.0, self.1 | (1 << Word1BitNumbers::LastBuffer as u32))
    }

the current code seems to incorrecly clear the last bit of the descriptor, while it should set the bit.

  1. In ethernet/phy/mod.rs
    Change the register number for the Pcr1 register from 0x1E to 0x05. Also a name change would be requiered since, it isn't the phy control register #1 anymore (this seems to be a vendor-specific register) but now it's the Auto Negotiation Link Partner Ability Register, which seems to be a standart register.

With these two changes it got it to without any problems. Thanks for your work on this!

@john-terrell
Copy link
Contributor Author

john-terrell commented Jan 8, 2023 via email

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

No branches or pull requests

2 participants