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

Disabling ADC Voltage Regulator before Low-power mode #231

Open
sreyhani opened this issue Oct 30, 2023 · 0 comments
Open

Disabling ADC Voltage Regulator before Low-power mode #231

sreyhani opened this issue Oct 30, 2023 · 0 comments

Comments

@sreyhani
Copy link

the only way to disable voltage regulater before going to sleep is to manually edit register yourself, which also needs access to internal rb by calling release on ADC, which deconsturcts the adc

adc.release().cr.modify(|_, w| w.advregen().clear_bit());

would be nice to have a direct API on this

hugglesfox added a commit to hugglesfox/stm32l0xx-hal that referenced this issue Feb 8, 2024
Power down the ADC voltage regulator as apart of the Adc::power_off()
method.

Additionally remove powering up the regulator in the Adc::new() method
to allow the Adc struct to be instantiated while in low power run mode.
The regulator will automatically be powered on when ADEN is set.

This is a partial fix for issue stm32-rs#231
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

1 participant