Skip to main content
JKim.15
Visitor II
October 24, 2023
Solved

I entered STOP mode and returned to NOMAL mode, but ADC does not work.

  • October 24, 2023
  • 1 reply
  • 746 views

Currently using STM32L496.

Pressing the button long key enters STOP mode as shown below.

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);

Additionally, you can exit STOP mode by pressing the interrupt button.

For reference, after exiting normal mode, use SystemClock_Config(); You must enter to return the timer to its original state.

When you press the interrupt button, it exits STOP mode and returns to NOMAL mode (TIMER, UART, I2C, SPI, LCD, etc. all operate normally.)

However, only the ADC does not work.

Is there any additional code that needs to be added after exiting the interrupt?

This topic has been closed for replies.
Best answer by Sarra.S

Hello @JKim.15

Try calling HAL_ADC_MspInit after waking up from stop mode 

1 reply

Sarra.SBest answer
ST Employee
October 24, 2023

Hello @JKim.15

Try calling HAL_ADC_MspInit after waking up from stop mode 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.