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 VSEL_A, enum for setting on-chip voltage regulator voltage #89

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

AkiyukiOkayasu
Copy link
Contributor

The increase in core voltage is mainly used for overclocking.
At first I sent a PR rp-rs/rp-hal#757 to rp-hal, but on @ithinuel's advice I decided to contribute to the PAC first.

This allows the voltage to be set in this way.
pac.VREG_AND_CHIP_RESET.write(|w| w.vsel.variant(VSEL_A::VOLTAGE1_20));

Previously, unsafe was required :(
pac.VREG_AND_CHIP_RESET.write(|w| unsafe { w.vsel().bits(12u8) });

Copy link
Member

@ithinuel ithinuel left a comment

Choose a reason for hiding this comment

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

LGTM

@ithinuel ithinuel merged commit b403960 into rp-rs:main Jan 20, 2024
4 checks passed
@AkiyukiOkayasu AkiyukiOkayasu deleted the vreg branch February 26, 2024 13:37
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.

3 participants