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

Fix ADC pins not working after deep sleep on RAK3172 #15527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #15391

Fix ADC pins on RAK3172 to work correctly after deep sleep is enabled.

  • Add code to save and restore ADC registers in hal_deepsleep function in targets/TARGET_STM/sleep.c.
  • Add code to disable deep sleep when ADC is configured in analogin_init function in targets/TARGET_STM/TARGET_STM32WL/analogin_device.c.
  • Add code to enable ADC only when a measurement is needed in adc_read function in targets/TARGET_STM/TARGET_STM32WL/analogin_device.c.

Related to ARMmbed#15391

Fix ADC pins on RAK3172 to work correctly after deep sleep is enabled.

* Add code to save and restore ADC registers in `hal_deepsleep` function in `targets/TARGET_STM/sleep.c`.
* Add code to disable deep sleep when ADC is configured in `analogin_init` function in `targets/TARGET_STM/TARGET_STM32WL/analogin_device.c`.
* Add code to enable ADC only when a measurement is needed in `adc_read` function in `targets/TARGET_STM/TARGET_STM32WL/analogin_device.c`.
@vishwamartur vishwamartur marked this pull request as ready for review November 2, 2024 07:19
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.

1 participant