Skip to content

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