Skip to content

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

Open
vishwamartur wants to merge 1 commit into
ARMmbed:masterfrom
vishwamartur:fix-adc-deep-sleep
Open

Fix ADC pins not working after deep sleep on RAK3172#15527
vishwamartur wants to merge 1 commit into
ARMmbed:masterfrom
vishwamartur:fix-adc-deep-sleep

Conversation

@vishwamartur
Copy link
Copy Markdown

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