Reputation: 1
I have encountered an issue while reading the ADC value. Additionally, I want to monitor the battery voltage via the ADC pin. The ADC works perfectly in run mode. However, once I implement it in low-power mode, it does not update the ADC value unless I manually reset the MCU. After resetting the MCU, the ADC updates its value. What could be causing this behavior, and how can I ensure the ADC updates properly in low-power mode?
To debug this issue, I've implemented a timer that starts the ADC in interrupt mode after a delay of 3 seconds. I couldn't configure the ADC in continuous mode because it remains in the wake-up mode, consuming power constantly. Consequently, the ADC consistently provides a value of 866 or 845, which is unexpectedly incorrect. In an attempt to resolve the issue, I replaced the normal timers with LPTIM, but the problem persists. I would appreciate it if someone could solve this issue or provide a clue that I can use to proceed further. Thanks.
Upvotes: 0
Views: 69