cancel
Showing results for 
Search instead for 
Did you mean: 

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

JKim.15
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

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.

View solution in original post

1 REPLY 1
Sarra.S
ST Employee

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.