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

improve usb errata 5 feature's documentation. #607

Merged
merged 5 commits into from
May 20, 2023

Conversation

ithinuel
Copy link
Member

No description provided.

@dlkj
Copy link
Contributor

dlkj commented May 12, 2023

LGTM, make this much clearer.

@ithinuel
Copy link
Member Author

@9names @jannic I added a bypass for the workaround if it is running on rev B2 and above.
@dlkj would you mind testing it with your system?

@ithinuel ithinuel linked an issue May 12, 2023 that may be closed by this pull request
@ithinuel ithinuel added this to the 0.9.0 milestone May 12, 2023
@jannic
Copy link
Member

jannic commented May 14, 2023

@9names @jannic I added a bypass for the workaround if it is running on rev B2 and above.

I'm not 100% sure if I like this. This can lead to situations were a firmware works perfectly for the developer, who happens to use a B2 stepping, and breaks for users with older chips.

In that sense, I'd prefer something like #608: Make it a guaranteed panic if you have the e5 workaround enabled and forget to initialize bank0 before USB.
(That code is completely untested - please just treat it as an idea.)

@jannic
Copy link
Member

jannic commented May 14, 2023

And I forgot to say: The update of the doc comment is great!

@jannic jannic added the non-breaking change This pull requests contains a minor, not SemVer breaking, change label May 14, 2023
@ithinuel
Copy link
Member Author

I'm not 100% sure if I like this. This can lead to situations were a firmware works perfectly for the developer, who happens to use a B2 stepping, and breaks for users with older chips.

In that sense, I'd prefer something like #608: Make it a guaranteed panic if you have the e5 workaround enabled and forget to initialize bank0 before USB.
(That code is completely untested - please just treat it as an idea.)

Oh I didn't think about this indeed, you're totally right.
Do you mind if I incorporate your suggestions to this PR?

I think bypassing the workaround is a good thing on B2 revs to avoid messing needlessly with the hardware but checking correct implementation with the requirements of the feature make sense too.

@jannic
Copy link
Member

jannic commented May 14, 2023

Do you mind if I incorporate your suggestions to this PR?

Of course not, go ahead!

Co-authored-by: Jan Niehusmann <jan@gondor.com>
Copy link
Member

@jannic jannic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some (minor) comments, but overall, this looks good.

rp2040-hal/Cargo.toml Outdated Show resolved Hide resolved
rp2040-hal/src/usb/errata5.rs Show resolved Hide resolved
rp2040-hal/src/usb/errata5.rs Show resolved Hide resolved
@ithinuel
Copy link
Member Author

@dlkj have you been able to test this last iteration?
If it works as expected,m for you I'll press merge :)

@dlkj
Copy link
Contributor

dlkj commented May 17, 2023

I've not had the time to check this yet. I'll find some time this week probably.

@dlkj
Copy link
Contributor

dlkj commented May 20, 2023

I can't reproduce the panic now using the same pico and a very similar code base. LGTM.

@ithinuel ithinuel merged commit cbf5fe6 into rp-rs:main May 20, 2023
@ithinuel ithinuel deleted the improve-errata5-documentation branch February 13, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-breaking change This pull requests contains a minor, not SemVer breaking, change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rp2040-e5 feature can randomly panic if not using gpio::Pins
3 participants